#include<bits/stdc++.h>
long N,M,i,x;
std::priority_queue<int>q;
int main(){
std::cin>>N>>M;
for(;N--;std::cin>>x,q.push(x));
for(;M--;x=q.top()/2,q.pop(),q.push(x));
for(x=0;!q.empty();x+=q.top(),q.pop());
std::cout<<x;
}