
fun main(arr:Array<String>) {
    val len = readLine()!!.toLong()

    var tmp = 0L
    for(i in (1..len)) {
        tmp += i
        if(tmp >= len) {
            println(i)
            return
        }
    }

}