#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007 

int main() {
	ll a,p;
	cin>>a>>p
	cout << (a*3+p)/2;
	// your code goes here
	return 0;
}