a,b,c=map(int,input().split()) k=int(0) if a<60:k+1 if b<60:k+1 if c<60:k+1 if k==1:print("1") if k!=1:print("0")