#include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
#include<string>
#include<cstdlib>
using namespace std;

int main()
{
  int n,p;
  cin >> n >> p;
  cout << (3*n+p)/2 << endl;