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

int main(){
	
	int n,m; cin>>n>>m;
	priority_queue<int> q;
	for(int i=0; i<n; i++) {
		int a;
		cin>>a;
		q.push(a);
	}
	for(int i=0; i<m; i++){
		int t = q.top()/2;
		q.pop();
		q.push(t);
	}
	ll cnt{};
	while(!q.empty()){
		cnt += q.top();
		q.pop();
	}
	cout << cnt << endl;
}