#include <iostream>
using namespace std;
int main()
{
    int a, b, c;
    cin >> a >> b >> c;
    int sum;
    sum = 21 - a - b - c;
    cout << sum << endl;
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

int main () {
	int a, b, c, d;
	cin >> a >> b >> c >> d;
	
 	cout << a*d - b*c << endl;



}