#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  long long K;
  cin >> K;
  map<int, long long> M;
  for (int i = 0; i < N; i++){
    int a, b;
    cin >> a >> b;
    M[a] += b;
  }
  long long c = 0;
  for (auto x : M){
    c += x.second;
    if (c >= K){
      cout << x.first;
      break;
    }
  }
}