import math;n=int(input());P=lambda p:0 if(g:=(g:=math.gcd(p,n))if g