Problem I. Increment and jump

Author:A. Klenin   Time limit:1 sec
Input file:input.txt   Memory limit:256 Mb
Output file:output.txt  

Statement

Young programmer Vasya decided to learn microprocessor design. As a first step, he designed a processor with a single integer register with initial value 0, and two instructions:

Vasya quickly noticed that this instruction set is not very useful, because any program containing even one jump instruction will loop forever.

Vasya's friend Petya suggested to modify a design so that after executing jump instruction processor would replace it with a special 'no-op' instruction which does nothing.

Now, Vasya's microprocessor could do something at least a little bit interesting. Vasya wants to write an emulator to explore the possibilities.

Your program must output a value in the register after the execution of a given program for Vasya's microprocessor.

Input file format

The input file contains a single string consisting of letters i and j — a program.

Output file format

Output file must contain single integer — value in the register.

Constraints

Program length is between 1 and 105 characters.

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
i
1
2
j
0
3
ijjijiijji
17

0.075s 0.011s 13