Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/kombinatorika-kopaytirish-qoidasi

Ways to get dressed

Easy 1000 ms 128 MB 20%
Share

A wardrobe has $a$ shirts, $b$ pairs of trousers and $c$ pairs of shoes. To get dressed, one shirt, one pair of trousers and one pair of shoes are chosen. Find the number of ways to get dressed.

A tree of choices of shirt, trousers and shoes

Input

One line with three positive integers: $a$, $b$ and $c$.

Output

One integer — the number of ways to get dressed.

Note

$1 \le a, b, c \le 10^{6}$

Examples

Input #1
3 2 2
Output #1
12
Input #2
1 5 1
Output #2
5

Sign in to submit a solution

Signing up is free and takes a minute.