409727: GYM103708 I Isabel's Divisions

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

Description

I. Isabel's Divisionstime limit per test0.3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Isabel is a very curious girl. She is learning to count and to divide numbers, as she is a beginner performing divisions she can divide only by a one digit number, for example, she can divide $$$123456$$$ by $$$2$$$ but not by $$$20$$$. To train her division skills she invented a simple game, she writes a number $$$N$$$ of at most $$$8$$$ digits and then she counts how many digits that form $$$N$$$ divide $$$N$$$ without reminder, for example, if $$$N = 111$$$, each of the three $$$1$$$ divide $$$N$$$ and then she counts $$$3$$$. if $$$N=39$$$ the only digit in $$$N$$$ that divides $$$N$$$ is $$$3$$$ and then she counts $$$1$$$.

Isabel wants you to play with her, but you are busy training for the next programming contest, then you decided to make a program that obtains the count Isabel will get for each $$$N$$$. This is your task in this problem.

Input

The input consists of a single line, which contains a positive integer number $$$N$$$ of at most 8 digits.

Output

Your program must output a single line, containing an integer indicating the count Isabel will get for the number N.

ExamplesInput
111
Output
3
Input
39
Output
1
Input
39333000
Output
4
Input
12345678
Output
4

加入题单

上一题 下一题 算法标签: