If the word finishes with 'n', 's', or a vowel, a word that is aguda gets an accent mark. It is the opposite for the grave; if it does not end in 'n', 's', or a vowel, it gets an accent mark.