# Greatest integer need greater mind

**Number Theory**Level 4

\[ \large x - \left( \lfloor r_1 x \rfloor + \lfloor r_1 x \rfloor + \lfloor r_1 x \rfloor + \ldots + \lfloor r_nx \rfloor \right) \]

Let \(r_1, r_2,r_3, \ldots, r_n\) be positive rational numbers such that their sum is 1. If \(x\) is an integer, in terms of \(n\), find the maximum value of the expression above.