#include<stdio.h>
int main(void){
  int a,b,c;
  scanf("%d %d %d",&a,&b,&c);
  printf("%d",21-(a+b+c));
  return 0;
}

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


int main() {
  int a,b,c;
  cin>>a>>b>>c;
  

  

  
  cout<<21-a-b-c<<endl;
}

