#include<iostream>
#include<string>
#include<cmath>
#include<algorithm> //max,min
#include<iomanip> //setprecision,tuple
#include<vector>  //vector
#include<numeric> //iota
#include<map> //map
#include<set> //set
#include<sstream> //stringstream(hex 16,dec 10,oct 8,bilset 2)
#include<list> //list 
using namespace std;
using lint = long long;
#define INF 2147483647
#define PI acos(-1)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

int main(){
    int a,b,c;cin>>a>>b>>c;
    int ans=21-(a+b+c);
    cout<<ans<<endl;
    return 0;
}
#include <bits/stdc++.h>
#define all(V) V.begin(),V.end()
#define pi 3.1415926535897932384626
#define fi fixed<<setprecision(13)
#define ll long long 
#define rep(i, n) for (int i = 0; i < (ll)(n); i++)
#define Rep(i, n) for (ll i = 1; i <=(ll)(n); i++)
#define reps(i,k,n) for (ll i = (ll)k; i < (ll)(n); i++)
using namespace std;
using V = vector<vector<int>>;
using Vc = vector<vector<char>>;
using Vb = vector<vector<bool>>;
using P = pair<int,int>;
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
template<class T> void chmin(T& a,T b){ if(a > b) a=b; }
template<class T> void chmax(T& a,T b){ if(a < b) a=b; }
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){ fill( (T*)array, (T*)(array+N), val );}
const ll infll=1LL<<62;
const ll inf=1<<30;
const int dx[4] = {0, 0, -1, 1};
const int dy[4] = {1, -1, 0, 0};
struct Edge{
  int to;
  ll w;
  Edge(int to,ll w) : to(to),w(w){}
};
using Graph = vector<vector<Edge>>;
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  /*----------------------------------------------------*/
  int a,b,c;
  cin >> a >> b >> c;
  cout << 21 - a - b - c <<"\n";
}
/*制約を確認しろllじゃなくて大丈夫か？*/
/* sample 保存



*/