#include <bits/stdc++.h>
using namespace std;
const int MM = 2e5 + 6;
int a[MM], b[MM];
map<int, int> tp;
int main() {
  int t, n, x;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    long long sum = 0;
    for (int i = 0; i < n; ++i) {
      scanf("%d", &a[i]);
      tp[a[i]] = 1;
    }
    sort(a, a + n);
    for (int i = n - 1; i >= 0; --i) {
      int flag = 0;
      int y = a[i];
      while (y % 2 == 0 && tp[a[i]] != 0) {
        if (y % 2 == 1) {
          break;
        } else {
          y /= 2;
          tp[y] = 0;
          sum++;
        }
        flag = 1;
      }
      if (flag) tp[a[i]] = 0;
    }
    cout << sum << endl;
  }
  return 0;
}
