#include <bits/stdc++.h>
using namespace std;
int n, t, a[200010];
int main() {
  cin >> t;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; ++i) cin >> a[i];
    priority_queue<int> PQ;
    for (int i = 0; i < n; ++i) {
      if (a[i] % 2 == 0) PQ.push(a[i]);
    }
    int cnt = 0;
    int cur = -1;
    while (!PQ.empty()) {
      if (PQ.top() == cur) {
        PQ.pop();
        continue;
      }
      cur = PQ.top();
      PQ.pop();
      if (cur % 4 == 0) PQ.push(cur / 2);
      ++cnt;
    }
    cout << cnt << "\n";
  }
  return 0;
}
