program ABC_056_C_GoHome
   implicit none
   integer(8) X, i ,S
   read(*, *) X
   do i = 1, 100000
      S = i * (i + 1) / 2
	  if(S >= X) then
	      write(*, *) i
		  exit
	  end if
   end do
end program ABC_056_C_GoHome