LearnPy Hub
← Arena
EasyRating 900

Burning Candles

You have a candles. Each burns for one hour. From b burnt candles you can make one new candle. How many hours of light can you get?

Input

Two integers a and b (1 ≤ a ≤ 1000, 2 ≤ b ≤ 1000).

Output

One integer.

Sample 1

Input
4 2
Output
7

Sample 2

Input
6 3
Output
8
solution.py
Output appears here
Burning Candles · Python Arena problem · LearnPy Hub