CMIMC 2017 Algebra Problem 5

The set S of positive real numbers x such that

\left\lfloor\frac{2 x}{5}\right\rfloor+\left\lfloor\frac{3 x}{5}\right\rfloor+1=\lfloor x\rfloor

can be written as S=\bigcup_{j=1}^{\infty} I_{j}, where the I_{i} are disjoint intervals of the form \left[a_{i}, b_{i}\right)=\left\{x \mid a_{i} \leq x<b_{i}\right\} and b_{i} \leq a_{i+1} \text{ for all } i \geq 1. Find \sum_{i=1}^{2017}\left(b_{i}-a_{i}\right).