#include using namespace std; int main(){ int ans=55; int n; for(int i=0;i<9;i++){cin >> n; ans-=n;} cout << ans << endl; return 0; }