add lower bound in max_calendar_year_gain.c