You are given a list L containing all natural numbers from 1 to n in order. If you move the last k numbers of this list to the front, you obtain a new list L1. For example, moving the last three numbers of the list 1,2,3,4,5,6,7 to the front gives 5,6,7,1,2,3,4.
Given two integers i and j in the range [1,n], you want to find the sum of the elements of L1 from the i-th to the j-th position, inclusive. For the list above with i=2 and j=6, that sum is 6+7+1+2+3=19.
Write a program that reads n, k, i, and j from standard input, computes the sum of the elements of L1 from the i-th to the j-th position, and prints the result to standard output.
The first and only line contains four integers n, k, i, and j separated by single spaces (2≤n≤109, 1≤k≤n, 1≤i≤j≤n).
Print a single integer equal to the sum of the elements of L1 from the i-th to the j-th position, inclusive.