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

#GL0000022. Đếm cặp có phần dư đủ lớn (Remainder Reminder)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Đếm cặp có phần dư đủ lớn (Remainder Reminder)

Remainder Reminder

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

Given N,KN,K, count ordered pairs of positive integers (a,b)(a,b) with a,b≤Na,b\le N and a mod b≥Ka\bmod b\ge K. Reversing a pair produces a distinct ordered pair.

Input

One line containing N,KN,K.

Output

Print the number of valid ordered pairs.

Subtasks

  • Subtask 1 (20 points): 1≤N≤1001 \le N \le 100; 0≤K≤N−10 \le K \le N-1
  • Subtask 2 (30 points): 1≤N≤100001 \le N \le 10000; 0≤K≤N−10 \le K \le N-1
  • Subtask 3 (50 points): 1≤N≤1051 \le N \le 10^{5}; 0≤K≤N−10 \le K \le N-1

Examples

Input

5 2

Output

7

Explanation

The seven qualifying pairs are (2,3),(5,3),(2,4),(3,4),(2,5),(3,5),(4,5)(2,3),(5,3),(2,4),(3,4),(2,5),(3,5),(4,5).