Cossack Vus and the Secret Letter
Cossack Vus urgently needs to send a letter containing secret information to his comrades. He visits a store that has envelopes, stamps with embroidery, and stamps with trousers.
To mail the letter, Cossack Vus must purchase:
one envelope
one or two stamps
Cossack Vus dislikes monotony, so he will buy at most one stamp of each type.
How many different ways can Cossack Vus make his purchase?
Two purchase methods are considered different if there is at least one envelope or stamp that Cossack Vus buys in one method but not in the other.
Giriş verilənləri
The first line contains three integers , , and — representing the number of envelopes, stamps with embroidery, and stamps with trousers, respectively.
Çıxış verilənləri
Output a single number — the number of ways to purchase the envelope and stamps.
Nümunələr
Qeyd
In the first example, Cossack Vus can purchase:
an envelope and a stamp with embroidery
an envelope and a stamp with trousers
an envelope and both stamps
In the second example, Cossack Vus can purchase:
an envelope and a stamp with trousers (1 way)
an envelope and one of the two stamps with embroidery (2 ways)
an envelope, a stamp with trousers, and one of the two stamps with embroidery (2 ways)