import java.util.*;enum C{C;System Z;Scanner S=new Scanner(Z.in);int a,b;{for(;(a=S.nextInt())!=(b=S.nextInt());)Z.out.println(a*a/b+b+1>>1);}}