#include #define ff first #define ss second #define pb push_back #define MOD (1000000007LL) #define LEFT(n) (2*(n)) #define RIGHT(n) (2*(n)+1) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair ii; typedef pair iii; ll pwr(ll base, ll p){ ll ans = 1;while(p){if(p&1)ans=(ans*base);base=(base*base);p/=2;}return ans; } ll gcd(ll a, ll b){ if(b == 0) return a; return gcd(b, a%b); } typedef vector VD; typedef vector VVD; typedef vector VI; ll n,ans,cnt; ll c[104]; int main() { scanf("%lld",&n); for(int i=0;i=0;i--) { ans += pwr(2,cnt)*c[i]; cnt += 1; } printf("%lld\n",ans ); return 0; }