13206 - 求能被整除的最小整数

通过次数

194

提交次数

374

Time Limit : 1 秒
Memory Limit : 128 MB

输入3个整数m,n,a;其中m <= n。求m到n中(包括m,n)能被a整除的最小整数,若m到n中没有能被a整除的数则输出-1。

Input

m n a (1≤m,n≤10^9且m≤n,1≤a≤100)

Output

m到n中(包括m,n)能被a整除的最小整数,若m到n中没有能被a整除的数则输出-1。

Examples

Input

7 10 2

Output

8