eolymp
bolt
Try our new interface for solving problems
Problems

Vasya`s arithmetic

Vasya`s arithmetic

Father once slipped Vasya's task: \textit{find the sum of all digits of numbers from }\textbf{1}\textit{ to }\textbf{10^n}. Vasya, who was fond of mathematics but also in programming, quickly solved the puzzle, but with Vasya's father is now a problem - and how to check the correctness of the answer son? Help dad Vasya's solve this puzzle, and then he somehow embarrassed in front of her son because of the inability to verify the answer with his son. \InputFile In single line set to one non-negative integer - \textbf{10^n}. It is known that the length of no more than a \textbf{10^7+1}. \OutputFile A single number - the required amount of digits.
Time limit 2 seconds
Memory limit 64 MiB
Input example #1
100
Output example #1
901
Author Анатолий Присяжнюк
Source Open and Distance Olympiads 2011-2012