#include <bits/stdc++.h>
using namespace std;
bool SortbySecDesc(const pair<long long, long long> &a,
                   const pair<long long, long long> &b) {
  return a.second > b.second;
}
bool SortbySecInc(const pair<long long, long long> &a,
                  const pair<long long, long long> &b) {
  return a.second < b.second;
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
struct compare {
  bool operator()(const pair<int, int> &value, const int &key) {
    return (value.first < key);
  }
  bool operator()(const int &key, const pair<int, int> &value) {
    return (key < value.first);
  }
};
int String_to_int(string s) {
  stringstream geek(s);
  int ans = 0;
  geek >> ans;
  return ans;
}
int S_I(string s) { return stoi(s); }
map<long long, long long> m;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n + 1];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] % 2 == 0) {
        m[a[i]]++;
      }
    }
    long long sum = 0;
    for (auto it : m) {
      long long kos = it.first;
      long long cnt = 0;
      while (1) {
        long long ans = kos / 2;
        if (ans % 2 == 1) {
          cnt++;
          break;
        }
        if (m[ans]) {
          cnt++;
          m[ans] += it.second;
          break;
        }
        kos = ans;
        cnt++;
      }
      sum += cnt;
    }
    cout << sum << "\n";
    ;
    m.clear();
  }
  return 0;
}
