def greatest_common_divisor(number1: int, number2: int) -> int:
    """Return greatest common divisor of number1 and number2."""
    if number1 < number2:
        divisor = number1
    else:
        divisor = number2
    while divisor > 0:
        if number1 % divisor == 0 and number2 % divisor == 0:
            break
        divisor -= 1
    return divisor