#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    set<int> x;
    ;
    for (long long int i = 0; i < n; i++) {
      int y;
      cin >> y;
      x.insert(y);
    }
    int count = 0;
    int temp;
    while (!x.empty()) {
      temp = *x.rbegin();
      if (temp % 2 == 0) {
        x.erase(temp);
        temp /= 2;
        x.insert(temp);
        count++;
      } else {
        x.erase(temp);
      }
    }
    cout << count << endl;
  }
}
