Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/case-yetti-segment

Seven-segment digit

Easy 1000 ms 64 MB 19%
Share

On an electronic clock, each digit is shown with seven light bars — segments. The picture shows which segments are lit for each digit from $0$ to $9$ (lit ones are blue). A digit $d$ is given. Find how many segments are lit to show it.

Digits 0 to 9 on a seven-segment display: lit segments blue, unlit ones faint

Input

One integer $d$.

Output

One integer — the number of lit segments.

Note

$0 \le d \le 9$

Examples

Input #1
8
Output #1
7
Input #2
1
Output #2
2

Sign in to submit a solution

Signing up is free and takes a minute.