a = 0; for i = -8:8 for j = -14:14 if (or (i^2 + j^2 < 35 , i^2 + (j^2)/4 < 50)) a = a + 1; end end end disp(a)