Consider the set A={2a+5b∣a,b=1,2,…,100} and notice that 1∈/A and 3∈/A.
The largest even number from A is equal to 700 and it is obtained for a=b=100. The number 698 is obtained for a=99,b=100. The largest odd number from A is equal to 695 and it is obtained for b=99,a=100, implying that 697∈/A and 699∈/A.
We claim that all the integers between 4 and 695 belong to A.
Let y≤500 and let r be the remainder left by y upon division by 5. Write y=5c+r with 0≤c≤100 and 0≤r≤4. If r is even, then y=5c+2k, where r=2k. If r is odd, then y≥5, so c≥1 and y=5(c−1)+2(k+3), where r=2k+1.
For y>500, write y=500+z with z≥200. If z is even, then y=5⋅100+2k, where z=2k. If z is odd, then y≤695, so z≤195 and y=5⋅99+2(k+3), where z=2k+1. A quick inspection of all the above cases shows that the claim holds.
S=101((1+2+⋯+700)−(1+3+697+699)=350⋅697)=35⋅697.