typedef long long ll;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,m;cin>>n>>m;
  priority_queue<int>Q;
  rep(i,n){
    ll x;cin>>x;
    Q.push(x);
  }
  rep(i,m){
    ll x=Q.top();
    Q.pop();
    Q.push(x/2);
  }
  ll ans=0;
  rep(i,n){
    ans+=Q.top();
    Q.pop();
  }
  cout<<ans<<endl;
}