A. Up Up Down Down
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Joanna is interested in video game cheat codes! Her favorite is the famous "Konami Code", which goes "up, up, down, down, left, right, left, right, b, a, start".

Joanna recently came across a Codeforces blog post from the infamous user UTPC_Admin. In the blog post, the mysterious UTPC_Admin describes a cheat code that promises to give the reader a rating of 4,000 on Codeforces, a new world record.

To test whether the cheat code is legit, Joanna has decided to compare it to the Konami Code. To do so, she will go through the cheat code input by input and see if it matches the Konami Code in the respective position. She defines the Cheat Score of a code to be the number of inputs which match the Konami Code in position.

Please help Joanna determine the Cheat Score of UTPC_Admin's cheat code so that she can decide whether it is legit!

Input

The input will consist of exactly 11 strings, each of which will be separated with a space and contain only lowercase English letters. Each string will consist of at most 100 letters.

Output

The output should consist of a single line containing a single integer, the Cheat Score of the given cheat code.

Examples
Input
up up down down left right left right b a start
Output
11
Input
up down up down right left right left a b stop
Output
2
Note

The first sample test case is the Konami Code, so its Cheat Score is 11. In the second sample test case, the first and fourth positions are the only ones that match the Konami Code.