#include <bits/stdc++.h>
using namespace std;
signed main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n, ans = 0;
    vector<pair<int, int>> v;
    cin >> n;
    for (int j = 0; j < n; j++) {
      int con = 0, A, z;
      cin >> A;
      while (A % 2 == 0) {
        con++;
        A /= 2;
      }
      v.push_back({A, con});
    }
    sort(v.begin(), v.end());
    for (int i = 0; i < v.size(); i++) {
      if (i == v.size() - 1)
        ans += v[i].second;
      else if (v[i].first != v[i + 1].first)
        ans += v[i].second;
    }
    cout << ans << endl;
  }
  return 0;
}
