#include <iostream> using namespace std; int main() { long long X,Y,Z; cin>>X>>Y>>Z; cout<<(X*3)+(Y*5)+(Z*12); }