n,m,p,*a=map(int,open(0).read().split()) if m==1: print(1) exit()