Under construction

Still being built. Things may change

CodeMaster 2024

Time limit1sMemory limit1024 MB

Summary
Given n, m, and k, print the total of Doohoon's m installs on each of k computers plus Teacher Cha's m installs on the laptop.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Songdo High School hosts CodeMaster 2024, a algorithm contest for middle and high school students, which is now in its second year.

For the offline contest, every one of the nn computers in the venue needs mm editors installed. Doohoon installed mm editors one at a time on each of kk computers, and then he gave up, having installed none on the remaining computers.

Teacher Cha Hyeong-jun stepped in to help. He installed mm editors one time each on a separate laptop, and then he ran a macro. The macro installed mm editors on every computer at once.

How many times were editors installed in total by Doohoon and Teacher Cha together? The installs done by the macro are not counted.

Input

Three integers nn, mm, and kk are given, separated by spaces.

Output

Print the total number of times Doohoon and Teacher Cha repeated the installs.

Constraints

  • 1≤k<n≤1 0001 \le k < n \le 1\,000.
  • 1≤m≤1 0001 \le m \le 1\,000.

Examples1

  1. Example 1

    Input
    40 4 24
    
    Expected output
    100