#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, ans = 0;
    cin >> n;
    map<int, int> m;
    for (int i = 0; i < n; i++) {
      int a;
      cin >> a;
      while (!(a & 1)) {
        ans += 1 - m[a];
        m[a] = 1;
        a >>= 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
