import java.util.Scanner; public class No98 { public static void main(String[]args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); double d = Math.sqrt(x*x+y*y); int D = (int)Math.floor(2*d); System.out.println(D+1); } }