"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const X = parseInt(arg[0]);
    
    let answer = 0;
    
    for(let i=1; i<=X+1; i++) {
        if(answer >= X) {
            console.log(i - 1);
            return;
        }
        
        answer += i;
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));