How old was John McCain when he graduated from the US Naval Academy?

John S. McCain was born on August 29, 1936 and graduated from the Naval Academy in June 1958 so he was 2 months shy of 22.