Joe is writing a formal essay for his English course. He wants you to write a program to calculate his final score. His teacher deducts 2 marks for an incorrect capitalization (first letter is capital, capital for letter after period, no capital otherwise) and incorrect punctuation (periods and commas must be followed by a space (except last), must end in a period). His teacher deducts contractions and personal pronouns by 1 mark and slang language is an instant 10 mark deduction.
Input Specification
The first line contains a single integer , the amount of characters in Joe's essay. The next line contains Joe's essay. The length of the essay is at most characters composed of words seperated by spaces, periods and commas (apostrophes work like normal characters).
The essay may contain contractions it's, can't, aren't, didn't
, personal pronouns i, we, me, us
, or slang language lol, yeet, sus, pog, orz, amongus
.
Output Specification
Output Eric's final grade given the grade deductions ( is the initial score).
If his grade drops below , output Fail
Sample Input 1
47
shakespeare is the .Greatest Writer alive .lol.
Sample Output 1
80
Explanation for Sample 1
Three incorrect capitalizations, two incorrect punctuations, one slang term.
Sample Input 2
53
i love playing amongus,it's the best game of ALL TIME
Sample Output 2
68
Explanation for Sample 2
Eight incorrect capitalizations, two incorrect punctuations, one contraction, one personal pronoun, one slang term.
Comments