ORTL1P03 - Calculation

no tags 

Given 3 integer values M, N and P solve the folowing ecuation:

If M is less than N solve R = M*N + P. On the contrary solve R = (M+N) * P.

Input

Three integer numbers M, N and P, in that order. [-100 <= M, N, P <= 100]

Output

R, the result of the ecuation.

Example

Input:
10 20 30

Output:
230

hide comments
dsr: 2015-03-30 13:51:07

As easy as pie... Good for extremely green and new guys like me!

siddharth jain: 2014-06-28 07:36:21

i got 83.33 in result. what does it mean
?


Added by:Joaquin
Date:2014-05-01
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64