the man will spend at most n steps(if he climb one step each time) to climb to the top,and at least n/2 or (n+1)/2 steps(if he climb two steps each time when n is an even num or climb two steps and one step the last time).

Each number between n and n/2 or (n+1)/2 is possible.For example:

when n is an even number

Way1、n=1+1+1+1.........+1

Way2、n=2+1+1.........+1

Way3、n=2+2..........+1

Way(n/2+1)、n=2+2......+2

thus,the result should be (n+1)/2 when the n is an even number,and n/2+1when n is an odd number???????