N, M, a, b = 0, 0, 0, 0 if N == 0: N, M = map(int, input().split()) else: a, b = map(int, input().split()) if a < b: print(0) else: print(1)