You are given a set A of integers from 1 to 1000 inclusive. Your task is to find the number of positive integers that can be represented as a sum of several elements of A, with number of summands being from ℓ to r inclusive. Equal summands are allowed. Note that each number is counted only once, even if it has several such representations.
The first line of the input contains three space-separated integers: n, the number of elements in A (1≤n≤1000), followed by ℓ and r, the bounds on number of summands (1≤ℓ≤r≤2000). The second line contains n space-separated integers a_1,a_2,…,a_n (1≤a_1<a_2<…<a_n≤1000): the elements of the set A in increasing order.
Output the number of integers that are representable as a sum of elements of A, with number of summands being between ℓ and r.