xingrun=int(input()) guli=int(input()) if xingrun>=10 or guli>=20: print(1) else: print(0)