#include <bits/stdc++.h>
using namespace std;
int n,m;
priority_queue<int>q;
int main(){
	cin>>n>>m;
	for (int i=1;i<=n;i++){
		int x;cin>>x;q.push(x);
	}
	while (m--){
		int x=q.top();q.pop();
		x/=2;q.push(x);
	}
	long long ans=0;
	while (!q.empty()){
		int x=q.top();q.pop();
		ans+=x;
	}
	cout<<ans;
}