#include<bits/stdc++.h>

using namespace std;

int main(void) {
	int n, m; cin >> n >> m;
	long long int  s;
	priority_queue<long long int> a;
	for (int i = 0; i < n; ++i) {
		cin >> s;
		a.push(s);
	}
	while (m > 0) {
		s = a.top() / 2;
		a.pop();
		a.push(s);
		m--;
	}
	s = 0;
	while (!a.empty()) {
		s += a.top();
		a.pop();
	}
	cout << s;
	return 0;

}

