#include <iostream>
#include <algorithm>
#include <set>
using namespace std;
pair<int,int> s[100010];

bool cmp(pair<int,int> a,pair<int,int> b){
    return a.first < b.first;
}


int main(){

    int n;
    long long k;
    long long sum = 0;

    cin >> n >> k;
    int a,b;
    for(int i=0;i<n;i++){
        cin >> a >> b;
        s[i].first = a;
        s[i].second = b;
    }
    sort(s,s+n,cmp);
    for(int i=0;i<n;i++){
        sum += (long long)s[i].second;
        if(sum >= k){
            cout << s[i].first << endl;
            break;
        }
    }

    return 0;
}
