fun main(args: Array<String>) {
    val x = readInt()

    var i = 1L
    while (i * (i + 1) < 2 * x) {
        i++
    }
    println(i)
}

// read
fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()