Segments#8497

Segments

1 second
256 megabytes
Easy

Consider a real axis and segments on it. You are to write a program that processes queries of two kinds.

You may assume that no more than segments will present on the axis simultaneously.

Input

Each line contains one query. Query can be in the form '- ' or '+ ' where and are integers (-10^9 ≤ < ≤ 10^9). There will be no more than queries.

Output

Print to the output one line for each '+ ' query, containing the number of segments inside the added segment.

Examples

Example 1

Loading
Loading