Problem H

High bridge, low bridge

Q: There are one high bridge and one low bridge across the river. The river has flooded twice, why the high bridge is flooded twice but the low bridge is flooded only once?

A: Because the lower bridge is so low that it's still under water after the first flood is over.

If you're confused, here's how it happens:

Just a word game, right? The key is that if a bridge is still under water (i.e. the water level is no less than the bridge height) after a flood, then next time it will not be considered flooded again.

Suppose the i-th flood raises the water level to ai and then back to bi. Given n bridges' heights, how many bridges are flooded at least k times? The initial water level is 1.

Input

The input contains at most 25 test cases. Each test case begins with 3 integers n, m, k in the first line (1<=n,m,k<=105). The next line contains n integers hi, the heights of each bridge (2<=hi<=108). Each of the next m lines contains two integers ai and bi (1<=bi<ai<=108, ai>bi-1). The file size of the whole input does not exceed 5MB.

Output

For each test case, print the number of bridges that is flooded at least k times.

Sample Input

2 2 2
2 5
6 2
8 3
5 3 2
2 3 4 5 6
5 3
4 2
5 2

Output for the Sample Input

Case 1: 1
Case 2: 3

Explanation

For the second sample, 5 bridges are flooded 1, 2, 3, 2, 0 times, respectively.


The Ninth Hunan Collegiate Programming Contest (2013)
Problemsetter: Rujia Liu
Special Thanks: Feng Chen, Md. Mahbubul Hasan