#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  long long K;
  cin >> N >> K;
  vector<pair<long long, long long> > v(N);
  for (int i = 0; i < N; ++i) cin >> v[i].first >> v[i].second;
  sort(v.begin(), v.end());
  long long res = 0;
  long long sum = 0;
  for (int i = 0; i < N; ++i) {
    sum += v[i].second;
    if (sum >= K) {
      res = v[i].first;
      break;
    }
  }
  cout << res << endl;
}
