#include using namespace std; int main() { int x; cin >> x; int p; cin >> p; int c = ((p + x) / 2) * 7; cout << c << endl; return 0; }