#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long modularExp(long long x, long long n, long long mod) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % mod;
    x = ((x % mod) * (x % mod)) % mod;
    n = n / 2;
  }
  return (result) % mod;
}
bool isPrime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
long long n;
bool iscorner(long long x, long long y) {
  if (x == 1 && y == 1) return true;
  if (x == n || y == n) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    map<long long, long long, greater<long long> > mp;
    long long i;
    for (i = 1; i <= n; i++) {
      long long x;
      cin >> x;
      if (x % 2 == 0) mp[x] += 1;
    }
    long long ans = 0;
    map<long long, long long, greater<long long> >::iterator it;
    for (it = mp.begin(); it != mp.end(); it++) {
      long long x = it->first;
      ans += 1;
      if (x % 4 == 0) mp[x / 2] += it->second;
    }
    cout << ans << "\n";
  }
}
