eolymp
bolt
Try our new interface for solving problems
Problems

Progress in artillery begins

Progress in artillery begins

Artillery has always been a native troops, which were intensively used different counting devices. Once they were mechanical and showed the results of calculations by means of wheels with painted figures. However, progress was not on the spot. Once the designers have developed an electrical device, which shows the results using segmented indicators - LEDs. \includegraphics{https://static.e-olymp.com/content/0a/0ab1a483b336da63114679009ef40c5f777e3d68.jpg} First, the progress necessary to develop a program that, given the number determines the number of LEDs, which should catch fire in order to properly display a given number. \InputFile Specific number \textbf{N} (\textbf{0} <= \textbf{N} <= \textbf{10^9}) \OutputFile The desired number of LEDs.
Time limit 1 second
Memory limit 64 MiB
Input example #1
123
Output example #1
12
Source II этап Всеукраинской олимпиады школьников 2008-2009, г. Бердичев