There is an n*m plot of land, each plot is either overgrown with weeds (represented by
'W') or empty (represented by 'G'), and now there is a man standing at (1,1), facing
(1,m), who can move in the following two ways:
1. It takes 1 unit of time to move one grid in the direction facing
2, move down one grid, and reverse the direction of the face (right to left, left to right),
spend 1 unit of time
Now he wants to know the minimum number of units of time it takes to remove all the weeds (no need to return (1,1))