After i found the above solution, i am thinking if someone want 100 steps or 1000 steps then how can i find it..? So we can't able to do the same grunt work.

So i requested to james give the general solution for this problem...Anyway i found the answer for this question..

-------------------
suresh