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