import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class No98 { public static void main(String[] args) throws IOException{ //円を描こう String[] str = readStr()[0].split(" "); double X = Double.parseDouble(str[0]) , Y = Double.parseDouble(str[1]); double R = Math.sqrt(X * X + Y * Y); int D; if(R == Math.ceil(R)) { D = (int)R * 2 + 1; }else { D = (int)Math.ceil(R * 2); } System.out.println(D); } public static String[] readStr() throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ArrayList list = new ArrayList<>(); do { list.add(br.readLine()); }while(br.ready()); br.close(); String[] text = new String[list.size()]; list.toArray(text); return text; } }