Олимпиадный тренинг

Задача 39392. Walk Gromozeka and Alice


Gromozeka and Alice are old friends. When they meet on some planet, they constantly go to a cafe. But Alice doesn't like to go to every a cafe, and Gromozeka doesn't like to go to every g cafe. In order not to offend anyone, they do not go to those cafes that Alice and Gromozeka do not want to go to at the same time. On their next walk, they have a N cafe on their way. How many cafes can they go to?

Input
The only line contains three integers - a , g , N ( 1 <= a , g , N <= 10 9 ).

Imprint
Print a single integer - the number of cafes that Gromozeka and Alice can visit.
 
Examples
# Input Output
1 1 1 10 0
2 1 2 5 3