#include<bits/stdc++.h>
using namespace std;
int main(){
	priority_queue<int>q;
	int m,n,t;
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++){
		scanf("%d",&t);
		q.push(t);
	}
	long long sum=0;
	while(m--){
		t=q.top()/2;
		q.pop();
		q.push(t);
	}
	while(!q.empty()){
		sum+=q.top();
		q.pop();
	}
	printf("%lld",sum);
	return 0;
}
