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

int main() {
	int n, m;
	cin >> n >> m;
	priority_queue<int> q;
	for (int i = 0; i < n; i++) {
		int a;
		scanf("%d", &a);
		q.push(a);
	}
	for (int i = 0; i < m; i++) {
		int a = q.top();
		q.pop();
		q.push(a / 2);
	}
	long x = 0;
	for (int i = 0; i < n; i++)
		x += q.top(), q.pop();
	cout << x << endl;
	return 0;
}
