#include<bits/stdc++.h>
using namespace std;

int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	cout<<21-a-b-c<<endl;
	return 0;
}
//#pragma GCC target ("avx2")
//#pragma GCC optimization ("O3")
//#pragma GCC optimization ("unroll-loops")

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define forr(i,n) for(int i=0;i<n;i++)
#define f(i,a,b) for(ll i=a;i<b;i++)
#define fi first
#define se second
#define pb push_back
//#define mp make_pair
#define endl '\n'
#define ce(ele) cout<<ele<<' '
#define CASE(t) ll t; cin>>t; while(t--)
#define sor(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define vi vector<ll>
#define cs(ele) cout<<ele<<'\n'
#define pii pair<ll,ll>
#define MAXN   100001
#define all(d) d.begin(),d.end()
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
const ll mod=1e9 +7;
//const ll mod=998244353;
//ll Mod(ll n){return ((n%mod)+mod)%mod;}
//ll power(ll x,ll y){ll res=1;x=x;while(y>0){if(y&1)res=mod(res*x);x=mod(x*x);y=mod(y>>1);}return mod(res);}

void fast(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);

}
ll f[200005];
ll invfact[200005];
ll power(ll x,ll y){
     ll res=1;
     while(y>0){
         if(y&1){
             res=(res*x)%mod;
         }
         x=(x*x)%mod;
         y>>=1;
    }
    return res;
}
void precal(){
    f[0]=1;
    invfact[0]=1;
    for(int i=1;i<200005;i++){
        f[i]=(f[i-1]*i)%mod;
        invfact[i]=power(f[i],mod-2);
    }
}
ll ncr(ll n,ll k){
    if(n<k||n<0||k<0){
        return 0;
    }
    return ((f[n]*invfact[k])%mod*invfact[n-k])%mod;
}

bool prime[10000011];
void primenumbers(ll n)
{

    memset(prime, true, sizeof(prime));

    for (ll p=2; p*p<=n; p++)
    {
        if (prime[p] == true)
        {
            for (ll i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }

}

ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}
int spf[MAXN];

void sieve()
{
    spf[1] = 1;
    for (int i=2; i<MAXN; i++)

        spf[i] = i;

    for (int i=4; i<MAXN; i+=2)
        spf[i] = 2;

    for (int i=3; i*i<MAXN; i++)
    {
        if (spf[i] == i)
        {
            for (int j=i*i; j<MAXN; j+=i)

                if (spf[j]==j)
                    spf[j] = i;
        }
    }
}
vector<int> getFactorization(int x)
{
    vector<int> ret;
    while (x != 1)
    {
        ret.push_back(spf[x]);
        x = x / spf[x];
    }
    return ret;
}
bool isSubsetSum(vi s, int n, int sum)
{
    bool subset[n + 1][sum + 1];

    for (int i = 0; i <= n; i++)
        subset[i][0] = true;


    for (int i = 1; i <= sum; i++)
        subset[0][i] = false;

    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= sum; j++) {
            if (j < s[i - 1])
                subset[i][j] = subset[i - 1][j];
            if (j >= s[i - 1])
                subset[i][j] = subset[i - 1][j]
                               || subset[i - 1][j - s[i - 1]];
        }
    }

    return subset[n][sum];
}
//------------------------------------------------------------------------------------


void solve(){
  ll a,b,c;
  cin>>a>>b>>c;
  cout<<21-a-b-c;


}



int main() {
 fast();
   // CASE(t)
    solve();




}
