package yukicoder; import java.util.Scanner; public class N415 { static int N=0; static int D=0; public static void main(String[] args) { Scanner sc=new Scanner(System.in); N=sc.nextInt(); D=sc.nextInt(); int[] fl=new int[N]; int pyon=0; int now=0; fl[0]=1; for(int i=1;iN-1)?now+D-N:now+D; } }