P18159 [NWERC 2026] Have You Been To Baden-Württemberg?
Description
As a true Baden-Württemberg resident, Helene brings her stash of “Nett hier. Aber waren Sie schon mal in Baden-Württemberg?”[^H-translation] stickers everywhere she goes.
Invented for a marketing campaign in 1999, the stickers can be found all over the world by now.
There is even a subreddit full of photos showing them in different locations and a website with an interactive map that tries to track every sticker in existence!
Helene is proud to say that she is doing her part.
However, the stickers are so widespread that she often finds one already stuck where she wants to place hers.
Today, she was even more surprised to also find multiple NWERC stickers from Karlsruhe placed in a row below a Baden-Württemberg sticker.
There must have been NWERC participants here before her, but with the stickers overlapping so much, it is hard to tell how many.
Before she adds her own sticker, she wants to work out the minimum number of NWERC stickers that must have been placed there.

*Figure 1: Visualization of all four samples. In the images, you can use the balloons to figure out where the stickers are placed.*
[^H-translation]: Translation: “Not bad. But have you ever been to Baden-Württemberg?”
Input Format
The input consists of:
- One line with a string $s$ ($5 \leq |s| \leq 2 \cdot 10^5$), the visible characters.
The string only consists of the characters `N`, `W`, `E`, `R`, and `C`.
It is guaranteed that the given string can be constructed by placing overlapping “`NWERC`” stickers on an empty wall.
Output Format
Output the minimum number of stickers that must have been placed.
Note that this must be achieved solely by placing “`NWERC`” stickers.