import java.util.*; import java.math.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int xp = sc.nextInt(); int yp = sc.nextInt(); int d = xp * xp + yp * yp; System.out.println((int)(Math.sqrt(d)*2)+1); } }