#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<ctime>
using namespace std;
int main(){
int a,b,c,n;
cin>>c>>n;
b = 3*5;
cout<<((c*3)+(b*n))<<endl;
return 0;
}
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<ctime>
using namespace std;
int main(){
int a,b,c,n;
cin>>c>>n;
b = 3*5;
cout<<((c*3)+(b*n))<<endl;
return 0;
}