#include <bits/stdc++.h>
using namespace std;
bool ada(set<int> &ss, int n) {
  set<int>::iterator it = ss.find(n);
  if (it != ss.end()) {
    return true;
  }
  return false;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    set<int> ss;
    int a[n];
    for (int i = 0; i < n; i++) {
      int temp;
      cin >> temp;
      a[i] = temp;
      ss.insert(temp);
    }
    sort(a, a + n);
    int ans = 0;
    for (int i = n - 1; i >= 0; i--) {
      while (ada(ss, a[i]) && a[i] % 2 == 0) {
        ss.erase(a[i]);
        a[i] /= 2;
        ss.insert(a[i]);
        ans++;
      }
    }
    cout << ans << endl;
  }
}
