fun main(args: Array<String>) {
    val X = readInputLine().toLong()
    
    for (i in LongRange(1, X)) {
        if (i * (i + 1L) / 2L >= X) {
            println(i)
            return
        }
    }
}

fun readInputLine(): String {
    return readLine()!!
}
