Let x2i=0,x2i−1=21 for all i=1,…,50. Then we have S=50⋅(21)2=225. So, we are left to show that S≤225 for all values of xi's satisfying the problem conditions. Consider any 1≤i≤50. By the problem condition, we get x2i−1≤1−x2i−x2i+1 and x2i+2≤1−x2i−x2i+1. Hence by the AM-GM inequality we get
x2i−1x2i+1+x2ix2i+2≤(1−x2i−x2i+1)x2i+1+x2i(1−x2i−x2i+1)=(x2i+x2i+1)(1−x2i−x2i+1)≤(2(x2i+x2i+1)+(1−x2i−x2i+1))2=41
Summing up these inequalities for i=1,2,…,50, we get the desired inequality
i=1∑50(x2i−1x2i+1+x2ix2i+2)≤50⋅41=225
Comment. This solution shows that a bit more general fact holds. Namely, consider 2n nonnegative numbers x1,…,x2n in a row (with no cyclic notation) and suppose that xi+xi+1+xi+2≤1 for all i=1,2,…,2n−2. Then ∑i=12n−2xixi+2≤4n−1. The proof is the same as above, though if might be easier to find it (for instance, applying induction). The original estimate can be obtained from this version by considering the sequence x1,x2,…,x100,x1,x2.