import scala.annotation.tailrec
import scala.io.{StdIn => in}

object Main extends App {

  def calc(num:Int):Int = {
    @tailrec
    def rec(acc:Int, cnt:Int):Int = {
      val fact = acc + cnt
      if(fact >= num) cnt
      else rec(fact, cnt+1)
    }
    rec(0,1)
  }

  val n =in.readInt
  val ans = calc(n)
  println(ans)
}