#include <bits/stdc++.h>
#include<iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
    int64_t N, a, b;
    vector<int64_t> square_number;
    cin >> N;
    for(a = 2; N >= pow(a, 2); a++){
        for(b = 2; N >= pow(a, b); b++){
            square_number.push_back(pow(a, b));
        }
    }
    sort(square_number.begin(), square_number.end());
    square_number.erase(unique(square_number.begin(), square_number.end()), square_number.end());
    int size = square_number.size();
    cout << N - size << endl;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i =0;i<(int)(n);i++)
#define endl '\n'
typedef pair<int,int> P;
typedef long long ll;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    set<string> s1;
    set<string> s2;
    int n;
    cin >> n;
    string ans = "satisfiable";
    rep(i,n){
        string s;
        cin >> s;
        if(s[0]=='!'){
            string t = s.substr(1,s.size()-1);
            if(s2.find(t)!=s2.end()){
                ans = t;
            }
            s1.insert(s);
        }
        else{
            string t = "!"+s;
            if (s1.find(t) != s1.end())
            {
                ans = s;
            }
            s2.insert(s);
        }
    }
    cout << ans << endl;
}