#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

struct SegmentTree {
    vector<int> tree;
    int n;

    SegmentTree(int size) {
        n = 1;
        while (n < size) {
            n *= 2;
        }
        tree.assign(2 * n, 0);
    }

    void update(int l, int r, int val, int x, int lx, int rx) {
        if (l >= rx || r <= lx) {
            return;
        }
        if (l <= lx && rx <= r) {
            tree[x] = val;
            return;
        }
        int m = (lx + rx) / 2;
        update(l, r, val, 2 * x + 1, lx, m);
        update(l, r, val, 2 * x + 2, m, rx);
        tree[x] = max(tree[2 * x + 1], tree[2 * x + 2]);
    }

    void update(int l, int r, int val) {
        update(l, r, val, 0, 0, n);
    }

    int query(int k, int x, int lx, int rx) {
        if (rx - lx == 1) {
            return lx;
        }
        int m = (lx + rx) / 2;
        int left_child = 2 * x + 1;
        int right_child = 2 * x + 2;
        if (tree[left_child] >= k) {
            return query(k, left_child, lx, m);
        } else {
            return query(k, right_child, m, rx);
        }
    }

    int query(int k) {
        return query(k, 0, 0, n);
    }
};

int main() {
    int n, q, k;
    cin >> n >> q >> k;

    vector<int> priorities(n);
    for (int i = 0; i < n; i++) {
        cin >> priorities[i];
    }

    SegmentTree segtree(n);
    for (int i = 0; i < n; i++) {
        segtree.update(i, i + 1, priorities[i]);
    }

    for (int i = 0; i < q; i++) {
        int l, r;
        cin >> l >> r;
        l--; // Convert to 0-based index
        r--;
        vector<int> subset;
        for (int j = l; j <= r; j++) {
            subset.push_back(segtree.query(segtree.query(priorities[j])));
        }
        sort(subset.begin(), subset.end());
        for (int j = l; j <= r; j++) {
            segtree.update(j, j + 1, priorities[subset[j - l]]);
        }
    }

    int answer = segtree.query(k);
    cout << answer + 1 << endl;

    return 0;
}