The number of specified digits#1609

The number of specified digits

1 second
128 megabytes
Very easy

Count the number of times digit appears in the number .

Input

The first line contains a -bit integer . The number can be negative. The second line contains a single digit .

Output

Print the number of times digit appears in .

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading