def main()

in gcd.py [0:0]


def main():
    a, b = input().split()
    print(gcd_recursive(int(a), int(b)))
    return