#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

int main()
{
    int A, B;
    cin >> A >> B;

    int limit = A * 2 + 100;
    
    cout << limit - B;


    return 0;

}

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

int main () {
  int a;
  int b;
  int c;
  cin >> a >> b >> c;
  
  int sum;
  sum = (7 - a) + (7 - b) + (7 - c);
  cout << sum; 
}