calculei max(f(n))