#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> ar(n);
    for (int &i : ar) cin >> i;
    long long res = 0;
    for (int i = 0; i < n; i++) {
      int cur = 0;
      while (ar[i] % 2 == 0) {
        cur++;
        ar[i] /= 2;
      }
      mp[ar[i]] = max(mp[ar[i]], cur);
    }
    for (auto v : mp) {
      res += v.second;
    }
    cout << res << endl;
    mp.clear();
  }
  return 0;
}
