n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
c=0
while c<m:
  d=a[0]/2
  for i in range(n):
    if a[0]==0:
      c=m
    if a[i]>d:
      a[i]//=2
      c+=1
      if c==m:
        break  
    else:
      a.sort(reverse=True)
      break
print(sum(a)) n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m a=list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a.sort(reverse=True) a.sort a sort reverse=True reverse True c=0 c 0 while c<m:
  d=a[0]/2
  for i in range(n):
    if a[0]==0:
      c=m
    if a[i]>d:
      a[i]//=2
      c+=1
      if c==m:
        break  
    else:
      a.sort(reverse=True)
      break c<m c m d=a[0]/2 d a[0]/2 a[0] a 0 2 for i in range(n):
    if a[0]==0:
      c=m
    if a[i]>d:
      a[i]//=2
      c+=1
      if c==m:
        break  
    else:
      a.sort(reverse=True)
      break i range(n) range n if a[0]==0:
      c=m
     a[0]==0 a[0] a 0 0 c=m c m if a[i]>d:
      a[i]//=2
      c+=1
      if c==m:
        break  
    else:
      a.sort(reverse=True)
      break a[i]>d a[i] a i d a[i]//=2 a[i] a i 2 c+=1 c 1 if c==m:
        break  
     c==m c m break a.sort(reverse=True) a.sort a sort reverse=True reverse True break print(sum(a)) print sum(a) sum a c+=1 1 c d=a[0]/2 a[0]/2 d c=m m c a=list(map(int,input().split())) list(map(int,input().split())) a n,m=map(int,input().split()) map(int,input().split()) n m=map(int,input().split()) map(int,input().split()) m c=0 0 c
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort(reverse=True)
c=0
while c<m:
  d=a[0]/2
  for i in range(n):
    if a[0]==0:
      c=m
    if a[i]>d:
      a[i]//=2
      c+=1
      if c==m:
        break  
    else:
      a.sort(reverse=True)
      break
print(sum(a))