#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

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