#include using namespace std; int main(){ long long sum=0; int n; cin >> n; vector calories(n); for(int calories_i = 0; calories_i < n; calories_i++){ cin >> calories[calories_i]; } sort(calories.rbegin(), calories.rend()); for(int i=0 ; i< n ; i++) { sum+=pow(2,i)*calories[i]; } cout<