p,q,a=map(int,input().split()) if a==0: print([0,10**9][p