#include <bits/stdc++.h>
#define ll long long
#define all(x) x.begin(), x.end()
#define pb(x) push_back(x)
using namespace std;
int n, m, k, g, a[100005], b[100005], c[100005], d[100005];
vector<int> t[400005];
void bld(int v, int l, int r){
 if(l == r){
  t[v].pb(a[l]);
  return;
 }
 int tm = (l + r) / 2;
 bld(v+v,l,tm);
 bld(v+v+1,tm+1,r);
 merge(all(t[v+v]),all(t[v+v+1]),back_inserter(t[v]));
}
int get(int v, int l, int r, int x, int y, int z){
  if(r < x || y < l) return 0;
  if(x <= l && r <= y){
    int res= 0 ;
    for(auto x : t[v]) if(x<=z)res++;
    return res;
    return lower_bound(all(t[v]), z) - t[v].begin()+1;
  }
  int tm = (l + r) / 2;
  return get(v+v,l,tm,x,y,z)+get(v+v+1,tm+1,r,x,y,z);
}
int teg(int l, int r, int k){
  int L = 1, R = n;
  while(L != R){
    int tm = (L + R) / 2;
    if(get(1,1,n,l,r,tm) >= k) R = tm;
    else L = tm + 1;
  }
  return L;
}
int main(){
 ios_base::sync_with_stdio(0);
 cin.tie(0);
 cin >> n >> m >> k;
 for (int i = 1; i <= n; i++){
  cin >> a[i];
   d[a[i]] = i;
 }
 bld(1,1,n);
 for(int i = 1; i <= m; i++){
   cin >> b[i] >> c[i]; 
 }
 for(int i = m; i >= 1; i--){
   int l = b[i], r = c[i];
   if(l <= k && k <= r){
     k = d[teg(1, r - l + 1, k - l + 1)] + l - 1;
   }
 }
 cout << k;
}
