maximum 500+500*n/(n+1)-10n, n>0