410175: GYM103968 A Counting Celebratory Candles

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Counting Celebratory Candlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

It's your best friend's birthday!!! You have decided to plan a birthday party and need to buy candles to write down your friend's age.

Specifically, your friend is sufficiently old that placing a single candle for each year would be a fire hazard, so instead you will need a candle for each digit in their age's decimal representation. The local government has recently passed some pro-birthday legislation, specifically making all $$$0, 2, 3, 4, 5, 6, 7, 8, 9$$$ candles completely free. This just means you need to buy your own candles for the digit $$$1$$$.

Given your friends age $$$N$$$, determine how many $$$1$$$ candles you'll need to purchase.

Input

A single number, $$$1 \leq N < 10^{1000}$$$.

Output

A single value, the number of $$$1$$$ candles you must purchase.

ExampleInput
603023841441
Output
2

加入题单

上一题 下一题 算法标签: