#include<bits/stdc++.h>
#define IONAME "cttf"
typedef long long ll;

int n;
std::set<std::string> x,y;
std::string ss[222000];


void marota(){
    std::cin>>n;
    for (int i=1;i<=n;i++){
        std::string s;
        std::cin>>s;
        ss[i]=s;
        if (ss[i][0]=='!') ss[i]=ss[i].substr(1,(int)ss[i].size()-1);
        if (s[0]=='!') y.insert(s.substr(1,(int)s.size()-1));
        else x.insert(s);
    }
    int err=0;
    for (int i=1;i<=n && !err;i++){
        if (x.find(ss[i])!=x.end() && y.find(ss[i])!=y.end()){
            std::cout<<ss[i];
            err=1;
        }
    }
    if (!err) std::cout<<"satisfiable";
}

int main(){
    std::ios_base::sync_with_stdio(false);
    std::cin.tie();
    std::cout.tie();
    #ifdef IONAME 
        if(fopen(IONAME".inp", "r") != nullptr){
            freopen(IONAME".INP","r",stdin);
            freopen(IONAME".OUT","w",stdout);
        }
    #endif
    marota();
    return 0;
}
///OM
///SUVOM SHAHA
///AUST CSE 39

#include<bits/stdc++.h>
#define loo(i, n) for(int i = 0; i < n; i++)
#define modo 1000000007
#define pb push_back
#define ff first
#define sc second
#define ii pair<int, int>
#define vi vector<int>
#define vii vector<ii>
#define ll long long int
#define inf 1000000000
#define mpch map<char, int>
#define mpint map<int, int>
#define endl '\n'
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
//to iterate map -> for(auto i : mp)
//vector of pair -> vec.pb(make_pair(a, b));
//reverse sort -> sort(ara, ara+n, greater<int>());
//modulus -> a = ((a%modo)+modo)%modo

using namespace std;

int main(void)

{
    ll n, i, a, b = 0;
    cin>>n;
    for(i = 0; i < n; i++){
        cin>>a;
        if(a > 10) b += (a-10);
    }
    cout<<b<<endl;
    return 0;
}
