Respuesta :

total += amount;

Should do it.