#include<bits/stdc++.h>
using namespace std;
int main()
{
	int m,n,a[107][107],c;
	for (m=0;m<=100;m++)
		for (n=0;n<=100;n++)
		{
			c=m*3+n;
			c=c/2;
			a[m][n]=c;
		}
	scanf ("%d%d",&m,&n);
	printf ("%d\n",a[m][n]);
	return 0;
}