Under construction

Still being built. Things may change

Farmers' Market

Time limit5sMemory limit1024 MB

Summary
Given apples per bag, number of bags, and the price per dozen, the task is to compute the cost when partial dozens are charged as full dozens.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Dr. Meade went to the local Farmers' Market to buy fresh fruit. Most stores expected customers to put fruit in bags and charged them by the weight of each bag. Dr. M was exhausted from grading the final exams, but he found a store where apples were already prepackaged! Every bag holds the same number of apples (for example, 5 apples per bag), and you may pick as many bags as you want. The store does not charge by the number of bags or their weight. It charges by the number of dozens of apples you have. If your total is not a multiple of 12, you are still charged for a full dozen. For example, if each bag has 5 apples and you pick 4 bags (20 apples in total), you are charged for 24 apples (two dozens) because 20 is not a multiple of 12. Given the number of apples in each bag, the number of bags Dr. M picked, and the price of one dozen apples, determine how much Dr. M has to pay.

Input

The first line contains two integers aa (1≤a≤201 \le a \le 20), the number of apples in each bag, and bb (1≤b≤201 \le b \le 20), the number of bags Dr. M picked. The second line contains an integer dd (1≤d≤201 \le d \le 20), the cost of one dozen apples.

Output

Print how much Dr. M has to pay.

Examples3

  1. Example 1

    Input
    5 4
    10
    
    Expected output
    20
    
  2. Example 2

    Input
    5 6
    15
    
    Expected output
    45
    
  3. Example 3

    Input
    16 3
    20
    
    Expected output
    80