import scala.io.StdIn._
object Main extends App {
  val x = readLong()
  (0L to math.sqrt(2000000000).ceil.toLong).find(i ⇒ i * (i + 1) / 2 >= x) match {
    case Some(min) ⇒ println(min)
    case None ⇒ ???
  }
}