#include<bits/stdc++.h>
using namespace std;
#define int long long 
#define pb push_back

main()
{
    #ifndef DEBUG             
    freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
    #endif
	ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
	
	int a,p;
	cin>>a>>p;

	cout<<(p+3*a)/2;	
}