While Joshua has been out, came back, and is now busy counting and sorting his candy, Shane is stuck with <REDACTED> at her birthday party (yes, it's on Halloween)!
The two are playing a unique card game, where each card has two sides: one side has a random letter, the other has a random number. The rules of the game are very simple:
- <REDACTED> will lay out the cards, one by one, each with either the letter OR number side facing up.
- <REDACTED> tells Shane that every card with the letter has the number on the back.
- Shane must then tell <REDACTED> a number , the least number of cards he needs to flip to check if she is telling the truth.
Can you help Shane determine what number he should tell <REDACTED>?
Psst... stop <REDACTED> from coming up with more devious card games by solving the mystery on why mcpt.ca is running out of resources!
Constraints
is an uppercase English letter.
Input Specification
The first line of input will contain the integer , the number of cards in the deck.
The second line will contain characters, representing the sides of the cards facing up. The -th character represents the -th card, and is either a number, , or a letter, .
The third and final line of input will contain and .
Output Specification
Output one integer, , the least number of cards Shane needs to flip over to check if <REDACTED> is telling the truth.
Sample Input
5
A 4 D 9 2
A 2
Sample Output
3
Comments