Input (grade 11): He qualified to compete in three team and five individual events, swimming seventeen races in nine days and winning the gold medal in all eight events.
Output (grade 8): Phelps qualified to compete in three team and five individual events.