2008 AIME II Problem 9

A particle is located on the coordinate plane at (5,0). Define a move for the particle as a
counterclockwise rotation of \pi / 4 radians about the origin followed by a translation of
10 units in the positive x-direction. Given that the particle’s position after 150 moves is (p, q),
find the greatest integer less than or equal to |p|+|q|.