In what city was the Royal Military Academy located?