ans = 0 for n, k in [map(int, input().split()) for _ in range(1000)]: while n > 1: n -= 1 if n <= k: ans += 1 break n -= k print(ans)