lucky, encourage = [int(i) for i in input().split()] if lucky >= 10 or encourage >= 20: print(1) else: print(0)