Centered at each lattice point in the coordinate plane are a circle with radius 1/10 and a square with sides of length 1/5 whose sides are parallel to the coordinate axes. The line segment from (0,0) and (1001, 429) intersects m of the squares and n of the circles. Find m+n.