#include <bits/stdc++.h>
using namespace std;
const int max_e = 6000;
const int inf = 0x3f3f3f3f;
char s[20];
int main() {
  int t, n, tmp;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<int> v;
    map<int, int> mp;
    for (int i = 0; i < n; ++i) {
      cin >> tmp;
      int num = 0;
      while (tmp % 2 == 0) {
        tmp /= 2;
        num++;
      }
      if (mp[tmp] == 0 && num != 0) {
        v.push_back(tmp);
      }
      mp[tmp] = max(mp[tmp], num);
    }
    int ans = 0;
    for (int i = 0; i < v.size(); ++i) {
      ans += mp[v[i]];
    }
    cout << ans << endl;
  }
  return 0;
}
