Problem B: PTA-计数问题

Problem B: PTA-计数问题

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

小明和小红玩一个数字游戏,游戏规则是一方给出一个数字n,对方需要说1到n的所有整数中,

数字x(0≤x≤9)共出现了多少次?

比如给出一个数字12,在1到12中数字2出现了几次?

即1 2 3 4 5 6 7 8 9 10 11 12中,数字2出现了2次(n≤65535)

Input

输入两个正整数n和x,之间用一个空格隔开。

Output

输出一个整数,表示x出现的次数

Sample Input Copy

11 1

Sample Output Copy

4