yu=int(input())
shu=int(input())
ying=int(input())
if yu<60 and shu>=60 and ying>=60:
print(1)
elif yu>=60 and shu<60 and ying>=60:
elif yu>=60 and shu>=60 and ying<60:
else:
print(0)