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