#include <bits/stdc++.h>
using namespace std;
const long long Long_max = numeric_limits<long long>::max();
const int Int_max = numeric_limits<int>::max();
void File_input(string pathIn) { freopen(pathIn.c_str(), "r", stdin); }
void File_output(string pathOut) { freopen(pathOut.c_str(), "w", stdout); }
void FastInputOutput() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
double a, b;
int main() {
  cin >> a >> b;
  cout << (a - b) + b * 3 + (b * 0.5) * 3;
  return 0;
}
