#include <bits/stdc++.h>
using namespace std;
#define int long long
using vec_int = vector<int>;
using P = pair<int,int>;
using T = tuple<int,int,int>;
using ll = long long;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

int charToInt(char c){
    char zero_num = '0';
    return (int)c - (int)zero_num;
}

void cout_line(vector<int> &a){
    for(int i=0;i<a.size();i++){
        if(i<a.size()-1){
            cout<<a.at(i)<<" ";
        }else{
            cout<<a.at(i)<<endl;
        }
    }
}

signed main(){
    int a; cin>>a;
    int b; cin>>b;
    int c; cin>>c;
    cout<<21-a-b-c<<endl;

    return 0;
}
#include<bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back;
#define ll long long
using namespace std;
typedef pair<int,int> pii;

///const int maxn=;

int main(){

    ///freopen("test.txt","r",stdin);
    ///freopen("moj.txt","w",stdout);


    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    printf("%d\n",21-a-b-c);

    return 0;
}

