#include <bits/stdc++.h>
using namespace std;

int main(){
	int N, M; cin >> N >> M;
	priority_queue<int> q;

	while(N--){
		int a; cin >> a;
		q.push(a);
	}

	while(M--){
		int next = q.top() / 2;
		q.pop();
		q.push(next);
	}
	long long sum = 0;
	while(!q.empty()){
		sum += q.top();
		q.pop();
	}

	cout << sum << endl;
}
