  The aim of this paper is to characterize the so-called Hardy means, i.e.,
those means $M\colon\bigcup_{n=1}^\infty \mathbb{R}_+^n\to\mathbb{R}_+$ that
satisfy the inequality $$
  \sum_{n=1}^\infty M(x_1,\dots,x_n) \le C\sum_{n=1}^\infty x_n $$ for all
positive sequences $(x_n)$ with some finite positive constant $C$. The smallest
constant $C$ satisfying this property is called the Hardy constant of the mean
$M$.
  In this paper we determine the Hardy constant in the cases when the mean $M$
is either a concave quasi-arithmetic or a concave and homogeneous deviation
mean.
