import java.util.*

fun Double.ceil() : Int {
    return Math.ceil(this).toInt()
}

fun main(args : Array<String>){
    val cin = Scanner(System.`in`)
    val x : Double = cin.nextInt().toDouble()

    val n = ((-1 + Math.sqrt(1 + 8 * x)) / 2).ceil()

    println(n)
}