#include<iostream>
using namespace std;
typedef long long ll;
ll A[100005];

int main(){
  ll n,k; cin >> n >> k;
  for(int i=0;i<n;i++){
    ll a,b; cin >> a >> b;
    A[a] += b;
  }
  ll sum = 0;
  int j = 0;
  while(sum<k){
    j++;
    sum += A[j];
  }
  cout << j << endl;
  return 0;
}
  