/**
Abir3014
**/

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

typedef long long ll;


#define boost 	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define for1(x, a, b)  for(x=a; x<b; x++)
#define for2(x, a, b)  for(x=a, x>=b; x--)
#define endl 	"\n"
#define all(x)  x.begin(), x.end()
#define p       pair
#define mp      make_pair
#define vi      vector<ll>
#define vii     vector<pair<ll, ll>>
#define msii    multiset<pair<ll, ll>>
#define msi     multiset<ll>
#define sii     set<pair<ll, ll>>
#define si      set<ll>
#define mii     map<ll, ll>
#define read	freopen("input.txt","r",stdin)
#define write   freopen("output.txt","w",stdout)
#define pb	    push_back
#define ff	    first
#define ss	    second
#define bb      begin
#define arr_ub(arr, n, x) upper_bound(arr, arr+n, x)-arr
#define arr_lb(arr, n, x) lower_bound(arr, arr+n, x)-arr
#define u_p(v, x) upper_bound(v.begin(), v.end(), x)-v.begin()
#define l_b(v, x) lower_bound(v.begin(), v.end(), x)-v.begin()
const ll sz=1e6+123;
#define INF 1000000000000000007
#define MOD 1000000007
#define stringLen 18446744073709551620
#define pi 3.1415926536
/**
ll fact(ll n){
	ll count=1;
	for(ll i=0; i<n; i++){
		count *= (n-i);
	}
	return count;
}
ll perm(ll n, ll r){
	ll count=1;
	for(ll i=0; i<r; i++){
		count *= (n-i);
	}
	return count;
}
ll comb(ll n, ll r){
	ll l = n-r, count=1;
	if(r<l)swap(l, r);
	count = perm(n, l);
	return count/fact(l);
}




vi divisorList[sz];
ll divisorNumber[sz];

void findDivisor(ll n){

	  for(ll i=1; i<=n; i++){

			for(ll j=i; j<=n; j+=i){
				 divisorList[j].pb(i);
		     	 divisorNumber[j]++;

			}
	  }


}



ll gcd(ll a, ll  b){
	return b==0? a: gcd(b, a%b);
}

// lcm * gcd = a*b

ll lcm(ll a, ll b){

	if(a>b)swap(a, b);

	return a*(b/gcd(a, b));



}

bitset<sz>is_prime;
vi prime;

void primeGen(int n){

     for(int i=3; i<=n; i+=2)is_prime[i]=1;

     int nn = sqrt(n)+1;
     for(ll i=3; i<nn; i+=2){

		     if(is_prime[i]==0)continue;

			for(int j=i*i; j<=n; j+=(i+i)){
				is_prime[j]=0;
			}

     }
     is_prime[2]=1;
     prime.pb(2);
     for(int i=3; i<=n; i+=2){
	      if(is_prime[i])prime.pb(i);
     }

}

vector<long long>primeDivisors[sz];
long long primeDivisorNumbers[sz];
void findPrimeDivisors(long long n){

	for(auto u:prime){

		for(long long i = u; i<=n; i+=u){
			primeDivisors[i].push_back(u);
			primeDivisorNumbers[i]++;
		}

	}
}



vector<long long>factorization(long long n){
	//O(sqrt(n)/ln(sqrt(n)) + log2 n)
	vector<long long>factors;

	for(auto u:prime){

		if(1LL*u*u > n) break;
		if(n%u==0){
		//	factors.push_back(u);//for generating unique factors keep this line here
			while(n%(u)==0){
				//factors.push_back(u);//for generating all factors keep this line here
				n/=(u);
			}
		}

	}

	if(n>1)factors.push_back(n);
	return factors;
}
bool isPalindrome(string s){
    ll i=0,j=s.size()-1;
    for(i,j;i<=j;i++,j--){
        if(s[i]!=s[j]) return 0;
    }
    return 1;
}
int modpow(int x, int n , int m){
	if(n==0 )return 1%m;
	long long u = modpow(x, n/2, m);
	u=(u*u)%m;
	if(n%2==1) u = (u*x)%m;
	return u;
}
int NOD(long long n){


	int res=1;

	for(auto u:prime){
		if(1LL*u*u > n)break;

		if(n%u==0){
		      int count=1;
			while(n%u==0){
				n/=u;
				count++;
			}
			res *= count;
		}


	}
	if(n>1)res*=2;


	return res;


}
bool isPalindrome(string s){
    ll i=0,j=s.size()-1;
    for(i,j;i<=j;i++,j--){
        if(s[i]!=s[j]) return 0;
    }
    return 1;
}
**/
ll test=0;
void solve(){

      int a, b, c;
      cin>>a>>b>>c;
      
      cout << 21 - a - b - c << endl;
      

      //cout<<"Case "<<++test<": "<<ans<<endl;
      //cout<<"Case #"<<++Case<<": ";

}
int main(){
	boost;
	//read; write;
	//int t; cin>>t; for(int i=1; i<=t; i++)
	solve();
	
	
	return 0;
}


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

const int maxn = 2e5+8, inf  = 1e18+9, mod  = 998244353;

int n, m;

void solve() {
    int i, j, a, b, c;
    cin >> a >> b >> c;
    cout << 21 - (a + b + c) << endl;
}

signed main() {
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); //cout << fixed << setprecision(15);
    int t = 1; //cin >> t;
    while (t--) solve();
    return 0;
}

