SCU 2005' Warmup Contest 7

B: Random Walk