#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
int main()
{
    set<int > s;
    int n;
    cin>>n;
    for(int i=0;i<n;i++)
    {
        int c,t;
        cin>>c;
        if(c==0)
        {
            cin>>t;
            s.insert(t);
            cout<<s.size()<<endl;
        }
        else
        {
            cin>>t;
            if(s.find(t)==s.end())
            {
                cout<<0<<endl;
            }
            else 
            cout <<1<<endl;
        }
    }
    
}
