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