#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               greater<pair<long long, long long> > >
    pq;
priority_queue<long long, vector<long long>, greater<long long> > p;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long a, p;
  cin >> a >> p;
  a *= 3;
  a += p;
  cout << a / p;
  return 0;
}
