#JSC2019QUALA. Takahashi Calendar

Takahashi Calendar

Score : 200200 points

Problem Statement

Today is August 2424, one of the five Product Days in a year.

A date mm-dd (mm is the month, dd is the date) is called a Product Day when dd is a two-digit number, and all of the following conditions are satisfied (here d10d_{10} is the tens digit of the day and d1d_1 is the ones digit of the day):

  • d12d_1 \geq 2
  • d102d_{10} \geq 2
  • d1×d10=md_1 \times d_{10} = m

Takahashi wants more Product Days, and he made a new calendar called Takahashi Calendar where a year consists of MM month from Month 11 to Month MM, and each month consists of DD days from Day 11 to Day DD.

In Takahashi Calendar, how many Product Days does a year have?

Constraints

  • All values in input are integers.
  • 1M1001 \leq M \leq 100
  • 1D991 \leq D \leq 99

Input

Input is given from Standard Input in the following format:

MM DD

Output

Print the number of Product Days in a year in Takahashi Calender.

15 40
10

There are 1010 Product Days in a year, as follows (mm-dd denotes Month mm, Day dd):

  • 44-2222
  • 66-2323
  • 66-3232
  • 88-2424
  • 99-3333
  • 1010-2525
  • 1212-2626
  • 1212-3434
  • 1414-2727
  • 1515-3535
12 31
5
1 1
0