For a graph F and a function f : N → R, let ef (F ) = ∑ x∈V (F ) f(d(x)) and let exf (n, F ) be the maximum of ef (G) over all F -free graphs G with n vertices. Suppose that f is a non-decreasing function with the property that for any ε > 0 there is δ > 0 such that for any n ≤ m ≤ (1+δ)n we have f(m) ≤ (1+ε)f(n). Under this assumption we prove that the asymptotics of exf (n, F ), where F is a ...