#include<bits/stdc++.h> using namespace std; int a[38],i=1; long long n; int main(){ while(cin>>a[i++]) for(int j=1;j<i;j++){ n+=a[j]; } n*=pow(2,i-2); cout<<n; return 0; }