The electric bracelet. Photographer Maj Stenmark. CC0
Thore is a visiting scholar at a progressive university,
whose administrators have decided that gendered pronouns are
politically incorrect. The pronouns
he,
she,
him, and
her must be replaced with the gender
neutral
they and
them. Thore doesn’t want to appear old-fashioned
but has difficulties adapting. To condition themselves to speak
properly, he — sorry, they — have programmed a
behaviour-improving wearable wristband to analyse their speech
and give them an electric shock every time he —
buzz — uses one of the forbidden words (
he,
him,
she, or
her). Thore is
worried that he —
buzz — will be
electrocuted and needs your help to determine how many electric
shocks he —
buzz — will receive from
different sentences.
Input
The first line of input is an integer , the number
of words Thore speaks. This is followed by a single line with
whitespace separated
words, each word consisting of up to lowercase characters a–z.
Output
The number of electrical shocks Thore receives.
Sample Input 1 |
Sample Output 1 |
9
she sheared a sheep herd and he helped her
|
3
|