import std.stdio, std.conv, std.algorithm, std.array;


void main()
{
        int xs[100010];
        long n, k;

        scanf("%d %d", &n, &k);

        for (int i = 0; i < n; i++) {
                int a, b;

                scanf("%d %d", &a, &b);
                xs[a] += b;
        }

        int i = -1;
        while (k > 0) {
                i++;
                k -= xs[i];
        }
        writeln(i);
}