for x=0 to 1000 sum (if ((x/2)*2==x || (x/3)*3==x) then x else 0)