#include<bits/stdc++.h> using namespace std; int n=3,k1,k2,k3,a,b,c; int main(){ cin>>n; cin>>k1>>" ">>k2>>" ">>k3; k1=2*(a+b); k2=4*a; k3=a+b+c; cout<<k1+k2+k3; return 0; }