#include <bits/stdc++.h>
using namespace std;
int n, t, a;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t--) {
    priority_queue<int> PQ;
    cin >> n;
    for (int i = 0; i < n; ++i) {
      cin >> a;
      if (a % 2 == 0) PQ.push(a);
    }
    int cnt = 0, 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;
}
