#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define SZ(v) ((int)(v.size()))
const int N = 2e5+9;
void run () {
    int a, b, c;
    cin >> a >> b >> c;
    int sum = 6 * 7 / 2;
    sum -= a;
    sum -= b;
    sum -= c;
    cout << sum << endl;
}
int main () {
    int tt;
    tt = 1;
//    cin >> tt;
    while (tt--)
        run();
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for(int i=(int)(x);i<(int)(y);i++)
#define print(A,x,n) rep(i,0,n){cout<<(i ? " ":"")<<A[i]x;}cout<<endl;
#define pprint(A,y,m,n) rep(j,0,m){print(A[j],y,n);}
const long mod=1e9+7;
const int siz=3e5;
const int inf=1e9;
int main(){
	int a,b,c; cin>>a>>b>>c;
	cout<<21 - a - b - c<<endl;
}