# coding: utf-8 # Your code here! import sys read = sys.stdin.read readline = sys.stdin.readline x,y = map(int,readline().split()) v = 4*(x*x+y*y) ng = 0 ok = 10**9 while ok-ng > 1: mid = (ok+ng)//2 if mid**2 > v: ok = mid else: ng = mid print(ok)