# Problem U+1F4A0 import math # input D_1, D_2 = map(int, input().split()) # initialization h = math.sqrt(D_2 / 2) if D_1>h: print(8) elif D_1==h: print(4) else: print(0)