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

#GL0000001. Đếm bội số trong đoạn (Between a and b ...)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Đếm bội số trong đoạn (Between a and b ...)

Between a and b ...

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

Given non-negative integers a,ba,b with a≤ba\le b and a positive integer xx, consider all integers in the inclusive interval [a,b][a,b]. Count those divisible by xx. Zero is divisible by every positive xx.

Input

One line containing a,b,xa,b,x.

Output

Print the number of qualifying integers.

Subtasks

  • Subtask 1 (20 points): 0≤a≤b≤1000 \le a \le b \le 100; 1≤x≤1001 \le x \le 100
  • Subtask 2 (30 points): 0≤a≤b≤1090 \le a \le b \le 10^{9}; 1≤x≤1091 \le x \le 10^{9}
  • Subtask 3 (50 points): 0≤a≤b≤10180 \le a \le b \le 10^{18}; 1≤x≤10181 \le x \le 10^{18}

Examples

Input

4 8 2

Output

3

Explanation

The numbers 4,6,84,6,8 are the only multiples of 22 in the inclusive interval, so the answer is 33.