fun main(args: Array<String>) {
    val N = readInputLine().toLong()
    
    var maxPoint = 0L
    
    for (i in LongRange(1L, N)) {
        if (i * (i + 1L) / 2L >= N) {
            maxPoint = i
            break
        }
    }
    
    var nowPoint = 0L
    
    for (i in LongRange(1L, maxPoint).reversed()) {
        if (nowPoint + i <= N) {
            println(i)
            nowPoint += i
        }
    }
}

fun readInputLine(): String {
    return readLine()!!
}
