#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
  ll n, k, i = 0, c = 0;
  cin >> n >> k;

  vector<pair<ll, ll> > p(n);
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;

  sort(p.begin(), p.end());

  while (c < k) {
    c += p[i].second;
    i++;
  }
  cout << p[i - 1].first << endl;
}