#include <stdio.h>
int main() {
int n, t;
scanf("%d %d", &n, &t);
int sum = 0;
for (int i = 1; i <= n; i++){
int shu = i;
while (shu) {
if (shu % 10 == t){
sum++;
}
shu /= 10;
}
}
printf("%d", sum);
return 0;
}

京公网安备 11010502036488号