def gcd(number1: int, number2: int) -> int:
    """Counts a greatest common divisor of two numbers.

    :param number1: a first number
    :param number2: a second number
    :return: greatest common divisor"""
    number_pair = (min(abs(number1), abs(number2)), max(abs(number1), abs(number2)))

    while number_pair[0] > 0:
        number_pair = (number_pair[1] % number_pair[0], number_pair[0])

    return number_pair[1]