#include #define rep(i,n) for(int i=0;i> N >> D; int now = 1, cnt = 0; while (now <= N) { now += D; cnt++; } if (now > N + 1) { cout << N - 1 << endl; } else { cout << --cnt << endl; } }