Two angles of a polygon are right angles and every other angle is 120 degree. Find the number of sides of the polygon.