Takina and Chisato are playing a game with a set of positive integers.
This game is about making continuous increasing sequences using the numbers from the set.
A continuous increasing sequence is defined as a sequence a_1,a_2,…,a_k of positive length k, satisfying a_i+1=a_i+1 for all 1≤i≤k−1.
The game begins with an empty set and consists of Q turns. In each turn, Takina can either insert a new integer into the set or delete an integer from the set.
Every time a change is made to the set, Chisato has to count how many different continuous increasing sequences can be made using the numbers from the set.
Your task is to help Chisato.
The first line contains the number of turns, Q.
The following Q lines contain two integers, describing Takina’s move. Each line has one of the following forms:
1 x : Insert x into the set. It is guaranteed that x was not in the set.2 x : Delete x from the set. It is guaranteed that x was in the set.Output Q integers separated by newlines, the number of continuous increasing sequences in the set after each Takina’s move.