count the sum number of ones from 1 to n, optimize use a piecewise three situation to sovle it to run quickly, and find the biggest number suffice f(n) = n