spoj#PUCMM025. Divisor Digits

Divisor Digits

Given a number, output how many digits in number that number itself is divisible by. Count all occurences of such digits in the number, not just the first.

For example, 12345 is divisible by 1, 3, and 5, so, the answer in this case must be 3.

Input

Each test case is a number between 1 and 10240.

Output

for each test case, output how many of its digits divide the number.

Example

Input:
12345
661232
312
730000000

Output:
3
3
3
0