from math import gcd

for c in range(564,283189):
    if gcd(c,282124) == 1:
        print(c)
        break

        
