Based on the reference text, provide a summary of how the monthly benefit amount for social security is calculated.