#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;
    }
    qsort(prices, N, sizeof(long), compare);
    i = N - 1;
    int m = M;
    while (prices[i] >= prices[i-1] && m > 0) {
        prices[i] /= 2;
        m --;
    }
    
    long result = 0;
    for (i = 0; i < N; i++) {
        result += prices[i];
    }
    printf("%ld", result);
    return 0;
}
