  Let G be a finite group with exactly k elements of largest possible order m.
Let q(m) be the product of gcd(m,4) and the odd prime divisors of m. We show
that |G|\le q(m)k^2/\phi(m) where \phi denotes Euler's totient function. This
strengthens a recent result of Cocke and Venkataraman. As an application we
classify all finite groups with k<36. This is motivated by a conjecture of
Thompson and unifies several partial results in the literature.
