Codeforces Round 133 (Div. 2)
A
Tiling with Hexagons
Codeforces
1200
原题
←B →
翻译中…

Several ages ago Berland was a kingdom. The King of Berland adored math. That's why, when he first visited one of his many palaces, he first of all paid attention to the floor in one hall. The floor was tiled with hexagonal tiles.

翻译中…

The hall also turned out hexagonal in its shape. The King walked along the perimeter of the hall and concluded that each of the six sides has $*a*$, $*b*$, $*c*$, $*a*$, $*b*$ and $*c*$ adjacent tiles, correspondingly.

翻译中…

To better visualize the situation, look at the picture showing a similar hexagon for $*a* = 2$, $*b* = 3$ and $*c* = 4$.

翻译中…

image

翻译中…

According to the legend, as the King of Berland obtained the values $*a*$, $*b*$ and $*c*$, he almost immediately calculated the total number of tiles on the hall floor. Can you do the same?

翻译中…

Input

翻译中…

The first line contains three integers: $*a*$, $*b*$ and $*c*$ ($2 ≤ *a*, *b*, *c* ≤ 1000$).

翻译中…

Output

翻译中…

Print a single number — the total number of tiles on the hall floor.

翻译中…

样例

Input #1
2 3 4
Output #1
18
InputCopy OutputCopy
题目信息
题号
216A
时间限制
2 s
内存限制
256 MB
标签
模拟
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。