#include <stdio.h>
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
    int N, M;
    scanf("%d, %d", &N, &M);
    long prices[N];
    int i, j;
    for (i = 0; i < N; i++) {
        long price;
        scanf("%ld", &price);
        prices[i] = price;
    }
    for (i = M; i > 0; i++) {
        long max = 0;
        int maxIndex = -1;
        for (j = 0; j < N; j++) {
            if(max < prices[j]) {
                max = prices[j];
                maxIndex = j;
            }
        }
        prices[maxIndex] /= 2;
    }
    
    long result = 0;
    for (i = 0; i < N; i++) {
        result += prices[i];
    }
    printf("%ld", result);
    return 0;
}