import java.util.*; public class draw{ public static void main(String... args){ Scanner scan = new Scanner(System.in); int x = scan.nextInt(),y = scan.nextInt(); int xx = x*x,yy = y*y; double r= Math.sqrt(xx+yy)*2; System.out.println((int)r+1); } }