sum floor(sqrt(j)), j=1 to n