import java.util.Scanner

object Main extends App  {
  val sc = new Scanner(System.in)
  val x = sc.nextLong

  val res = (10000L to 1L by -1).find(n => x > n * (n + 1) / 2).get + 1

  println(res)
}
