#include<stdio.h>
#include<stdlib.h>
#define MAX_SIZE 100000
int hash_set[MAX_SIZE];


void initialize_hash_set(){
    for(int i = 0; i < MAX_SIZE; i++) {
        hash_set[i] = 0;
    }
}
void add_subscription(int id) {
    if (id >= 0 && id < MAX_SIZE) {
        hash_set[id] = 1;
    }
}
void remove_subscription(int id) {
    if (id >= 0 && id < MAX_SIZE) {
        if (hash_set[id] == 1) {
            printf("subscription\n");
        } else {
            printf("Not subscription\n");
        }
    }
}
void total_subscription(){
    int count = 0;
    for (int i = 0; i < MAX_SIZE; i++){
        if (hash_set[i] == 1) {
            count ++;
        }
  }
  printf("%d\n", count);
}
int main(){
    int q;
    scanf("%d", &q);
    initialize_hash_set();
    
    for (int i = 0; i < q; i++) {
        int query, id;
        scanf("%d", &query);
        if(query == 1){
            scanf("%d", &id);
            add_subscription(id);
            
        }else if (Query == 2){
            scanf("%d", &id);
            remove_subscription(id);
            
        } else if (query == 3) {
            scanf("%d", &id);
            cheak_subscription(id);
            
        } else if (query == 4) {
            total_subscription();
        }
    }
    return 0;
}