401919: GYM100574 F Valentine's Candles

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

F. Valentine's Candlestime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard output

It's valentine's day and everyone wants to have a romantic night. Nima, our hero is also one of this people and want's to decorate his place to have a romantic night with his love, Ghazal .

So, he went to CANDLE store (a special store that only sells candles). The store has only n candles and there are some customers there (including Nima). A customer would be happy if he/she buys exactly m candles. The salesman wants to make as much as customers as possible happy.

You should calculate this number using language Prolan.

Your program's order mustn't exceed 107 .

Input

n / m = ?

1 ≤ n, m ≤ 10100

Output

A single integer, the answer.

ExamplesInput
100/5=?
Output
20
Input
13/3=?
Output
4
Input
4/5=?
Output
0

加入题单

上一题 下一题 算法标签: