let q_1,q_2,...,q_k be positive rational numbers whose sum is 1. Find the maximum value of the function g(n) = n - (sum(floor(n*q_i), i=1...k))
where n goes through all positive integers.