from math import gcd
print(gcd(gcd(36, 54), gcd(18, 15)))