Vasya is organizing an inventory for a role-playing game that involves players, each portraying a character from a fantasy world. Each character has a level , where 1 \le x \le m.
To represent character levels, two types of tokens are used: white and red. A white token signifies one level, and a red token represents levels. A character of level requires white tokens and red tokens such that a + bk = x. Additionally, a character cannot have more than k - 1 white tokens.
Tokens are prepared in advance, but the actual levels of the characters are not known beforehand. To ensure the game runs smoothly, it is necessary to prepare enough tokens so that any possible assignment of levels is covered. The task is to determine the minimum total number of tokens that should be prepared.
Write a program that, given , , and , computes the minimum number of tokens needed.
The input consists of a single line containing three integers: , , and (1 \le n \le 10^4, 1 \le m \le 10^5, 1 \le k \le 10^5).
Print a single integer: the minimum number of tokens that must be prepared.
Example 1