"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const X = parseInt(arg[0].split(" ")[0]);
    
    if(X === 1) {
        console.log(1);
        return;
    }
    
    let sum = 0;
    let now = 0;
    
    for(let i=1; i<=X; i++) {
        sum += i;
        now = i;
        
        if(sum === X) {
            console.log(i);
            return;
        }
        
        if(sum > X) break;
    }

    console.log(now);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));