import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int d2 = x * x + y * y; int left = 0; int right = 40000; while (right - left > 1) { int m = (right + left) / 2; if (Math.pow((double)m / 2.0, 2) > d2) { right = m; } else { left = m; } } System.out.println(right); } }