# -*- coding:utf-8 -*- import math (x,y) = [int(i) for i in input().rstrip().split(" ")] dist = pow(x,2) + pow(y, 2) ans = int(math.sqrt(dist) * 2) while (ans / 2) * (ans / 2) <= dist: ans += 1 print(ans)