$$\bar{A}\cdot\bar{B}\cdot\bar{C} + A\cdot\bar{B}\cdot C + A\cdot B\cdot \bar{C} + A \cdot B\cdot C$$
The point of this excercise is to get you to see that when a formula is written as a sum of products (disjunctive normal form) that it can be converted to nands without changing the layout of your circuit, you just replace some gates with nand gates.
First, you can introduce nots in pairs:
$$\lnot \lnot X = X$$
Second, there are 2 ways to represent nand (I'll write with the sheffer stroke, $|$) from 'and' and 'or':
$$A|B = \lnot (A \cdot B)$$
$$A|B = (\lnot A) + (\lnot B)$$
So introduce double negation to your formula as follows:
$$ (\lnot\lnot(\bar{A}\cdot\bar{B}\cdot\bar{C}))
+ (\lnot\lnot(A\cdot\bar{B}\cdot C ))
+ (\lnot\lnot(A\cdot B\cdot \bar{C}))
+ (\lnot\lnot(A \cdot B\cdot C))$$
Rewrite the ands:
$$ (\lnot(\bar{A} | \bar{B} | \bar{C}))
+ (\lnot(A | \bar{B} | C ))
+ (\lnot(A | B | \bar{C}))
+ (\lnot(A | B | C))$$
Rewrite the ors:
$$ (\bar{A} | \bar{B} | \bar{C}) |
(A | \bar{B} | C ) |
(A | B | \bar{C})\ |
(A | B | C)$$
Schematically, it is the same as: for each wire that starts at the output of an and-gate, and ends at the input of the or-gate: add not-gates to the start and end of the wire.
An analogous procedure can be used to convert product-of-sums (conjunctive normal form) to nor-gates.