#include<bits/stdc++.h>
#include<algorithm>

using namespace std;

#define MAX 100000+10
typedef long long LL;
int N,M,cur=0;
LL ans=0,A[MAX];

int main(){
	scanf("%d%d",&N,&M);
	for(int i=0;i<N;i++){
	    scanf("%lld",&A[i]);	
	}
	sort(A,A+N);
	while(M--){
		A[N-1] /= 2;
	    int p=N-2;
		while((p>=0)&&(A[p]>A[p+1])){
			LL temp=A[p+1];
			A[p+1]=A[p];
			A[p]=temp;
			p--;
		}  
	}
	for(int i=0;i<N;i++)
	    ans += A[i];
	cout<<ans<<endl;
	return 0;
} 