Limits 1s, 512 MB

Once upon a time there was a king. He had a huge kingdom and the king was very kind. All of his subjects were living happily. Although the king was very sad. He had a son. But he was not very responsible. He had no interest of being a king and take care of his kingdom. He liked to travel and read and listen to music all day long. He was also a poet.

This made the king sad. He thought when he dies and his son becomes king, he won't be able to manage the huge kingdom. Evil people will take advantage of him. The country had dark days coming.

One day something very bad happened. A very deadly disease spread throughout the country. the disease was called 'dengue'. The disease was spread by small insects called 'mosha'.

Soon Millions and billions of moshas spread in the country and caused massive outbreak of dengue fever. The king became worried, but didn't know what to do. He asked his son to take care of the situation. But he was too busy writing a new romantic novel.

A lot of helpless pheasants died from the fever and people became angry. There were riots here and there. Day by day king became more worried and felt helpless.

One day a mosha bit the king and he became ill too. He thought he will die for sure and every one in the country will suffer dark fate. When his son went to see him he came to his senses. He wanted to save his father but didn't know what to do.

He went to the 'wise man' and asked for his help. The wise man said, there are no more than 10^9 mosha in this country. If you can kill every one of them, these dark days will pass away.

The prince set forth with his army of soldiers and cannons to each corner of the country. He visited all the jungles and killed lots of moshas. Months after month passed by. But the prince was very weak in math. He couldn't figure out how many mosha he has killed, and how many more he needed to kill.

One day he met you and asked for your help. He had written all the number of moshas he killed each day. He asked you to calculate how many moshas he has killed in total.

Input

Input will contain no more than 300 integer number. each number represents the number of moshas killed each day.

Output

Output will contain one integer. The integer represents how many moshas were killed in total.

Sample

InputOutput
1000 1001 5000 3742 672
11415

Submit

Login to submit.

Contributors

Statistics

85% Solution Ratio
DC_SubmitDCEarliest, Oct '18
DC_SubmitDCFastest, 0.0s
RIONMIALightest, 0 B
Nusab19Shortest, 28B
Toph uses cookies. By continuing you agree to our Cookie Policy.