#include <bits/stdc++.h>
using namespace std;
priority_queue<int> que;
int n;
int main() {
  int T;
  scanf("%d", &T);
  for (int tmn = 1; tmn <= T; tmn++) {
    while (que.empty() == false) que.pop();
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      int x;
      scanf("%d", &x);
      if (x % 2 == 0) que.push(x);
    }
    int pre = 1, num = 0, ans = 0;
    while (que.empty() == false) {
      int fro = que.top();
      if (pre == 1) {
        pre = fro, num = 1;
        que.pop();
        continue;
      }
      if (fro != pre) {
        pre /= 2;
        if (pre % 2 == 0)
          for (int i = 1; i <= num; i++) que.push(pre);
        pre = 1, num = 0;
        ans++;
        continue;
      }
      num++;
      que.pop();
    }
    while (pre % 2 != 1) pre /= 2, ans++;
    printf("%d\n", ans);
  }
  return 0;
}
