L, K = map(int,input().split()) ans = 0 while L > 0: L -= K if L > K: ans += K L -= K else: break print(ans)