#include <bits/stdc++.h>
using namespace std;
using l=long long;
int main(){
  l n,m;cin>>n>>m;
  priority_queue<l>p;
  while(n--){l x;cin>>x;p.push(x);}
  while(m--){l x=p.top();p.pop();
  p.push(x>>1);}
  l a=0;
   while(!p.empty())
   {l x=p.top();p.pop();a+=x;}
  cout<<a<<endl;
  }