#include<bits/stdc++.h>

using namespace std;
priority_queue<int>q;
int main()
{
	long long n,m,a;
	cin >> n >> m;

	for(int i = 0;i < n;i ++){
		cin >> a;
		q.push(a);
	}
	long long sum = 0;
	int t;
	for(int i = 0;i < m;i ++){
		t = q.top()/2;
		q.pop();
		q.push(t);
	}
	while(!q.empty()){
		sum += q.top();
		q.pop();
	}
	cout << sum << endl;
	return 0;
}