#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using namespace std;
int n, x;
void solve() {
  cin >> n;
  set<int> s;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x % 2 == 0) s.insert(x);
  }
  int ans = 0;
  while (s.size()) {
    auto it = s.end();
    --it;
    int val = *it;
    s.erase(*--s.end());
    while (!s.count(val) && val % 2 == 0) {
      val /= 2;
      ++ans;
    }
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
