It is narrated from Sayyiduna Mu'adh bin Anas (may Allah be pleased with him) that a man came to a gathering in which the Prophet (peace and blessings be upon him) was present, and said: As-salamu alaykum (Peace be upon you). He (peace and blessings be upon him) returned his greeting and said: "Ten good deeds." Then another came and said: As-salamu alaykum wa rahmatullah (Peace be upon you and the mercy of Allah). He (peace and blessings be upon him) said: "Twenty." Then a third came and said: As-salamu alaykum wa rahmatullahi wa barakatuh (Peace be upon you, and the mercy of Allah and His blessings). He (peace and blessings be upon him) said: "Forty." And he said: "This is how the reward increases."
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17525