Under construction

Still being built. Things may change

Gears

Interview

Time limit1sMemory limit1024 MB

Summary
Count how many distinct fractions a/b exist with both a and b in the range M to N.
Level

Medium5 of 10

Topics
Math, Number theory, Combinatorics, Brute force
Solved
No attempts yet

Problem

A watchmaker owns a lathe that can make gears with anywhere from MM to NN teeth.

Write a program that determines how many different gear ratios (transmissions built from two gears) can be produced on this machine. Two gear ratios are counted as different when their value — the number of teeth on the first gear divided by the number of teeth on the second gear — is different.

Input

The first line contains two space-separated integers MM and NN (1≤M≤N≤10001 \le M \le N \le 1000), the minimum and maximum number of teeth on the gears that this machine can make.

Output

Print the number of different gear ratios that can be produced, on a single line.

Examples1

  1. Example 1

    Input
    2 6
    
    Expected output
    17