'use strict'
function main(input) {
    const tmp = input.split('\n');
    const NK = tmp.shift().split(' ').map((elem) => parseInt(elem, 10));
    const N = NK[0];
    const K = NK[1];

    let bucket = new Array(100030).fill(0);
    for (let ab of tmp) {
        const a = parseInt(ab.split(' ')[0], 10);
        const b = parseInt(ab.split(' ')[1], 10);
        bucket[a] += b;
    }


    let count = 0;
    for (let i = 0; i < bucket.length; i++) {
        count += bucket[i];
        if (count >= K) {
            console.log(i);
            break;
        }
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));