Yet another 2D Walking

Problem Name:
Yet another 2D Walking
Site:CodeForces
Links:
Tags:
Problem setters: