import java.util.*

fun main(args : Array<String>) {
    val sc = Scanner(System.`in`)
    val x = sc.next().toLong()
    println(problem56c(x))
}

fun problem56c(x: Long): Long {
    var time = 0L
    var currentX = 0L
    while(currentX < x) {
        time++
        currentX += time
    }
    return time
}