It seems to me that in general you are after the distribution of $M:=\max(X_1,\dots,X_n)$ where the $X_i$ are iid random variables (correct me if I am wrong).
The CDF of $M$ can easily be expressed in the CDF of the $X_i$:
$$F_M(x)=P(X_1\leq x,\dots,X_n\leq x)=F(x)^n$$
In the special case you mention we find: $$p_k=P(M=k)=F^3(k)-F^3(k-1)$$ for $k=3,\dots,18$ so that: $$\mathbb EM=\sum_{k=3}^{18} k[F^3(k)-F^3(k-1)]$$
Alternatively you could use:$$\mathbb{E}M=\sum_{k=0}^{17}P\left\\{ M>k\right\\} =\sum_{k=0}^{17}1-F^{3}\left(k\right)$$