def calculate_package_checksum(packages):
    """
    Given  a list of packages, calculate its checksum, which is the number of words with two repeated letters times
    the number of words with three letters.
    :param packages: list of package names
    :return: the checksum as specified above

    >>> calculate_package_checksum(['abcdef', 'bababc', 'abbcde', 'abcccd' 'aabcdd', 'abcdee', 'ababab'])
    12
    """

    twocount, threecount = 0, 0
    for package in packages:
        # Make a map according to num letters.
        letters = {}
        for letter in package:
            letters.setdefault(letter, 0)
            letters[letter] += 1

        twocount += 1 if 2 in letters.values() else 0
        threecount += 1 if 3 in letters.values() else 0

    return twocount * threecount