John and Brus believe that number N is a very bad number. Thus they try to avoid it every time and everywhere.
Now the guys would like to represent number M as a sum of positive numbers, each of which not exceeding K. But don’t forget about the bad number N! Each summand must not be divisible by N, moreover the number of summands also must not be divisible by N.
Your task is to find the minimal possible number of summands in such representation of M.
For example, if N=3, M=11, K=6 then we can represent M as 5+6, but as far as 6 is divisible by 3 we must have at least 3 summands. But as far as N=3 we can’t have 3 summands and thus the answer is 4. One of the possible ways to represent M is 11=4+4+2+1.
给你三个整数N,M,K(N, M, K≤10^9),求一个最小的P,使得M能够被分成P个正整数的和。
并且这些整数要满足:(一)不能是N的倍数,(二)大小不能超过K。并且P也不能是N的倍数。