|Input file:||input.txt||Time limit:||1 sec|
|Output file:||output.txt||Memory limit:||256 Mb|
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'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.
The input file contains a single string consisting of letters i and j — a program.
Output file must contain single integer — value in the register.
Program length is between 1 and 105 characters.
|No.||Input file (
||Output file (|