D = list(map(int, input().split())) if D[0] < D[1]: print(8) elif D[0] == D[1]: print(4) else: print(0)