#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long t, n, i, j, temp;
  cin >> t;
  while (t--) {
    cin >> n;
    set<long long> s;
    for (i = 0; i < n; i++) {
      cin >> temp;
      if (temp % 2 == 0) {
        s.insert(temp);
      }
    }
    long long ans = 0;
    while (s.size()) {
      ans++;
      long long largestElem = *(s.rbegin());
      s.erase(largestElem);
      if ((largestElem / 2) % 2 == 0) {
        s.insert(largestElem / 2);
      }
    }
    cout << ans << "\n";
  }
  return 0;
}
