#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ar[n];
    map<int, int> mp;
    for (int i = 0; i < n; i++) cin >> ar[i];
    sort(ar, ar + n);
    for (int i = n - 1; i >= 0; i--) {
      if (ar[i] & 1)
        ar[i] = 0;
      else {
        if (mp[ar[i]] == -1) {
          ar[i] = 0;
          continue;
        }
        int c = 0, temp = ar[i];
        ar[i] = ar[i] ^ (ar[i] & (ar[i] - 1));
        c = log2(ar[i]);
        ar[i] = c;
        while (!(temp & 1)) {
          mp[temp] = -1;
          temp >>= 1;
        }
      }
    }
    int ans = 0;
    for (int i = 1; i < n; i++) ar[i] += ar[i - 1];
    cout << ar[n - 1] << "\n";
  }
}
