#include <bits/stdc++.h>
using namespace std;
int hg;
string gh = "here";
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> v(n);
    map<int, int> m;
    int ans = 0;
    for (int i = 0; i < n; i++) {
      cin >> v[i];
      if (v[i] % 2 == 1) continue;
      int q = v[i], cnt = 0;
      while (q % 2 == 0) {
        q = (q >> 1);
        cnt++;
      }
      if (cnt > m[q]) {
        ans -= m[q];
        ans += cnt;
        m[q] = cnt;
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
