#include <iostream>
#include <string>
using namespace std;

int main(){
    long long n, k, cnt[100002]{}, ans = 0, sum = 0;
    cin >> n >> k;
    for(int i=0;i<n;i++){
        long long a, b;
        cin >> a >> b;
        cnt[a] += b;
    }
    while(k > sum){
        ans++;
        sum += cnt[ans];
    }
    cout << ans << endl;
    return 0;
}
