#include <bits/stdc++.h>
using namespace std;
int n, t;
map<int, int> mp;
int main() {
  scanf("%d", &t);
  for (int i = 1; i <= t; ++i) {
    mp.clear();
    scanf("%d", &n);
    int ans = 0;
    for (int i = 1, res, x; i <= n; ++i) {
      scanf("%d", &x);
      res = 0;
      while ((x & 1) == 0) {
        x >>= 1;
        ++res;
      }
      if (res > mp[x]) ans += res - mp[x], mp[x] = res;
    }
    printf("%d\n", ans);
  }
  return 0;
}
