#include<stdio.h>
#include<cstdio>
#include<iostream>
#include<cmath>
#include<queue>
#include<bits/stdc++.h>
using namespace std;

//long  s[112345];
priority_queue<int> q;
int main()
{
	int i,n,m;
 	cin>>n>>m;
 	int k;
	for(i=0;i<n;i++){
		cin>>k;
		q.push(k); 
	}
	for(i=1;i<=m;i++){
		k=q.top() ;
		k/=2;
		q.pop() ;
		q.push(k); 
	}
	long long ss=0;
	while(!q.empty() ){
		ss+=q.top() ;
		q.pop();
	}
	cout<<ss<<endl;
	return 0;
}