x, y = map(int, input().split()) len_d = ((x**2 + y**2)**(0.5)) * 2 print(int(len_d)+1)