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

int main() {
  long long N, K;
  cin >> N >> K;
  vector<pair<int, int>> a(N);
  for (int i = 0; i < N; i++)
    cin >> a[i].first >> a[i].second;
  sort(a.begin(), a.end());
  int i = 0, ans = 0;
  while (K > 0)
    ans = a[i].first, K -= a[i].second, i++;
  cout << ans << endl;
}