409046: GYM103427 E Edward Gaming, the Champion

Memory Limit:512 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Edward Gaming, the Championtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output

On November 6, 2021, the Chinese team Edward Gaming (EDG) defeated the South Korea team DWG KIA (DK) to win the 2021 League of Legends World championship in Reykjavík, Iceland, lifting the Summoner's Cup for the first time in their history.

While both teams had looked dominant throughout the competition, DK arguably had the advantage. The team hadn't lost a single game until they reached the semi-finals and was the only team to make it out of the Group Stage without a single defeat. They were clearly the team to beat.

EDG had given them a hit at the very first game of the final. The game started with a well-executed gank in the bot lane by EDG for the first blood. Later, EDG took every single Drake and the Baron, and ultimately destroyed the DK's Nexus after 35 minutes.

But DK wouldn't leave it unanswered. They maintained an advantage throughout the second game. Not even the incredible Baron steal by EDG's legendary jungler, Jiejie, could help the team.

The third game turned out to be a difficult one. EDG seems to have control over more resources during the first 30 minutes. However, DK constantly killed every single dragon, and they finally took down the Nexus with the Hand of Baron.

In the fourth game, EDG had rethought their approach and took higher precedence in the control over dragons. The strategy had immediately taken effect, and they won the game after 33 minutes.

All things came down to the last game of the finals. Initially, DK took up the first dragon without much resistance from EDG. Shortly after, EDG picked first blood as DK took the Herald. Everything was fairly even at that moment. The balance finally started to tip in EDG's favor during a team fight in the mid-lane, with EDG killing DK's midlaner Showmaker before they had a chance to respond. The fight finally ended up with four kills and one death for EDG. They snowballed their advantage and finally secured the trophy.

The triumph of the Worlds 2021 made EDG the first team from LPL to win both the Mid-Season Invitational and the World Championship. You have just written a long string to celebrate this great victory. How many occurrences of edgnb as a continuous substring are there in the long string? Please write a program to count the number.

Input

The only line contains a nonempty string, which consists of no more than $$$200\,000$$$ lowercase Latin letters, a to z.

Output

Output a line containing a single integer, indicating the number of occurrences of edgnb in the given string.

ExampleInput
edgnb
Output
1

加入题单

算法标签: