Woburn Challenge 2017-18 Round 2 - Junior Division

One for the Dark Lord on his dark throne,
In the Land of Mordor where the Shadows lie,
One ring to rule them all, one ring to find them,
One ring to bring them all and in the darkness bind them,
In the Land of Mordor where the Shadows lie.
As the above passage indicates, a number of Rings of Power exist in
Middle-earth, with exactly one of them owned by the Dark Lord Sauron,
and the others distributed amongst Elves, Dwarves, and Men according to
the values
Input Specification
The first and only line of input consists of three space-separated
integers,
Output Specification
Output a single integer, the total number of Rings of Power.
Sample Input
3 7 9
Sample Output
20
Sample Explanation
Elves have
Comments