## The Polar Express

View as PDF

Points: 7 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

Mimi has just won two raffle tickets for the Polar Express! Unfortunately, there is just one obstacle in the way — the skill testing question!

Let us define to be the sum of digits of . Given two positive integers, and , compute the number of distinct values of , for .

Mimi has agreed to give you the other ticket if you help her solve this problem. Can you do it?

#### Input Specification

The first and only line of input will contain two space separated integers, and .

#### Output Specification

A single integer, the number of distinct values of .

#### Sample Input

19 28

#### Sample Output

9