#include <bits/stdc++.h>
using namespace std;
using Pi = pair<int, int>;
using ll = long long;
using Pl = pair<ll, ll>;
constexpr int INF = (1 << 30) - 1;
int N;
void solve() {
  priority_queue<int> pq;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int A;
    cin >> A;
    pq.push(A);
  }
  int cnt = 0;
  while (!pq.empty()) {
    int value = pq.top();
    pq.pop();
    while (!pq.empty() && value == pq.top()) pq.pop();
    if (value % 2 == 0) {
      cnt++;
      pq.push(value / 2);
    }
  }
  cout << cnt << endl;
  return;
}
int main() {
  int T;
  cin >> T;
  while (T--) solve();
  return (0);
}
