Input (grade 10): Macdonald's tenure in office spanned 18 years, making him the second longest serving Prime Minister of Canada.
Output (grade 6): Macdonald's time in office spanned 19 years. So he was the second longest serving Prime Minister of Canada.