Progress in artillery begins#358

Progress in artillery begins

1 second
64 megabytes
Very easy

Artillery has always been a branch of the military that uses various calculation devices intensively. In the past, these devices were mechanical and displayed results using wheels painted with numbers. However, progress did not stand still. Designers eventually developed an electrical device that shows results using segmented LED indicators.

To mark this progress, you need to develop a program that, for a given number, determines the number of LEDs that must light up to properly display the number.

Input

A number (0 \leq N \leq 10^9).

Output

The required number of LEDs.

Examples

Example 1

Loading
Loading