#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t, n, a;
  cin >> t;
  while (t--) {
    cin >> n;
    set<long long int> s;
    for (long long int i = 0; i < n; i++) {
      cin >> a;
      while (a % 2 == 0) {
        if (s.count(a))
          break;
        else
          s.insert(a);
        a /= 2;
      }
    }
    cout << s.size() << "\n";
  }
  return 0;
}
