program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: x,i

    read*, x

    do i=1,100000
        if (((i-1)*i)/2 + 1 <= x .and. x <= (i*(i+1))/2) then
            print'(i0)', i
            stop
        end if
    end do
end program name