#include <bits/stdc++.h>
using namespace std;
const int N = 200021;
inline int scan() {
  char c = getchar();
  int x = 0;
  while (c < '0' || c > '9') {
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  return x;
}
int main() {
  double n, k;
  cin >> n >> k;
  cout << n + 7 * k / 2 << endl;
  return 0;
}
