from math import sqrt c, s = map(int, input().split()) if s < c or c * sqrt(2) < s: ans = 0 elif c == s: ans = 4 else: ans = 8 print(ans)