#include <bits/stdc++.h>
using namespace std;
string en = "\n";
string sp = " ";
string t = "hello";
string Y = "YES\n";
string N = "NO\n";
bool isprm(long long a) {
  for (long long i = 2; i * i <= a; i++) {
    if (a % i == 0) return false;
  }
  return true;
}
bool palin(string a) {
  for (int i = 0; i < a.size(); i++) {
    if (a.at(i) != a.at(a.size() - i - 1)) return 0;
  }
  return 1;
}
bool isVowel(char ch) {
  ch = toupper(ch);
  if (ch == 'A' || ch == 'U' || ch == 'I' || ch == 'O' || ch == 'E')
    return true;
  return false;
}
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
long long ceil2(long long a, long long b) {
  long long c = a / b;
  if (a % b) c++;
  return c;
}
long long bpow(long long a, long long b) {
  if (b == 0) return 1;
  long long r = bpow(a, b / 2);
  if (b % 2)
    return r * r * a;
  else
    return r * r;
}
long long binpow(long long a, long long b) {
  long long r = 1;
  while (b > 0) {
    if (b & 1) r = r * a;
    a = a * a;
    b >>= 1;
  }
  return r;
}
long long binpow(long long a, long long b, long long m) {
  a %= m;
  long long r = 1;
  while (b > 0) {
    if (b & 1) r = r * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return r;
}
template <typename T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <typename T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
int main() {
  long long i, j, k, n, m, l, s = 0, x, y, tc = 1, p, q, a, b, c = 0;
  bool f = 0, ff = 0;
  string st;
  char ch;
  cin >> tc;
  while (tc--) {
    cin >> n;
    set<long long> ss;
    for (i = 0; i < n; i++) {
      cin >> x;
      if (x % 2 == 0) ss.insert(x);
    }
    c = 0;
    for (auto it = ss.rbegin(); it != ss.rend(); it++) {
      x = *it;
      while (x % 2 == 0) {
        c++;
        x = x / 2;
        if (ss.find(x) != ss.end()) break;
      }
    }
    cout << c << en;
  }
}
