L, K = map(int, input().split()) A = L // K if L % K == 0: print(A - 1) else: print(A)