d1, d2 = map(int, input().split()) if d1 > d2: ans = 0 elif d1 == d2: ans = 4 else: ans = 8 print(ans)