check the number of sums less than number