This page is still under construction.

Parts of this page are still being built. What you see may change.

Snacks

Time limit1sMemory limit256 MB

Summary
Compute K times N minus M, or zero when the money on hand covers the total snack price.
Level

Easy1 of 10

Topics
Math
Solved
No attempts yet

Problem

Dongsu wants to buy snacks at a bakery. When his own money is not enough, he gets the difference from his parents. One snack costs KK won, he wants NN snacks, and he currently holds MM won.

The snacks cost K×NK \times N won in total. If that total is larger than MM, he has to get the difference K×N−MK \times N - M won from his parents, and if MM is at least the total, he gets nothing. For example, buying 4 snacks at 30 won each while holding 100 won needs 20 won, and buying 6 snacks at 20 won each while holding 120 won needs nothing.

Given KK, NN, and MM, find how much money Dongsu has to get from his parents.

Input

The first line contains the price of one snack KK, the number of snacks NN, and the money Dongsu holds MM, separated by spaces. All three are integers with 1≤K,N≤10001 \le K, N \le 1000 and 1≤M≤1000001 \le M \le 100000.

Output

Print on the first line the amount Dongsu has to get from his parents. Print 0 when he needs nothing.

Examples4

  1. Example 1

    Input
    300 4 1000
    
    Expected output
    200
    
  2. Example 2

    Input
    250 2 140
    
    Expected output
    360
    
  3. Example 3

    Input
    20 6 120
    
    Expected output
    0
    
  4. Example 4

    Input
    20 10 320
    
    Expected output
    0