PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000096. Tổng BCNN của bộ ba – bản dễ (LCM Sum, Easy Version)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Tổng BCNN của bộ ba – bản dễ (LCM Sum, Easy Version)

LCM Sum (easy version)

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Given two positive integers ll and rr, consider all triples (i,j,k)(i,j,k) with l≤i<j<k≤rl\le i<j<k\le r. A triple is valid if lcm⁡(i,j,k)≥i+j+k\operatorname{lcm}(i,j,k)\ge i+j+k. Count the number of valid triples. Every triple is identified by its three values in increasing order.

Input

One line contains two integers l,rl,r.

Output

Print one integer: the number of valid triples.

Subtasks

  • Subtask 1 (20 points): 1≤l1\le l, l+2≤r≤200l+2\le r\le 200.
  • Subtask 2 (30 points): 1≤l1\le l, l+2≤r≤20000l+2\le r\le 20000.
  • Subtask 3 (50 points): 1≤l1\le l, l+2≤r≤200000l+2\le r\le 200000.

Examples

Input

1 4

Output

3

Explanation

The range [1,4][1,4] contains four triples. Only (1,2,4)(1,2,4) is invalid because its LCM is 44, smaller than the sum 77. The other three triples are valid, hence the answer is 33.