#include<bits/stdc++.h>

using namespace std;

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