#include<bits/stdc++.h>
   #include <ext/pb_ds/tree_policy.hpp>
    #include <ext/pb_ds/assoc_container.hpp>
    using namespace std;
    using namespace __gnu_pbds;

    #define mod 1000000007

    void __print(int x) {cerr << x;}
    void __print(long x) {cerr << x;}
    void __print(long long x) {cerr << x;}
    void __print(unsigned x) {cerr << x;}
    void __print(unsigned long x) {cerr << x;}
    void __print(unsigned long long x) {cerr << x;}
    void __print(float x) {cerr << x;}
    void __print(double x) {cerr << x;}
    void __print(long double x) {cerr << x;}
    void __print(char x) {cerr << '\'' << x << '\'';}
    void __print(const char *x) {cerr << '\"' << x << '\"';}
    void __print(const string &x) {cerr << '\"' << x << '\"';}
    void __print(bool x) {cerr << (x ? "true" : "false");}

    template<typename T, typename V>
    void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
    template<typename T>
    void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
    void _print() {cerr << "]\n";}
    template <typename T, typename... V>
    void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
    #ifndef ONLINE_JUDGE
    #define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
    #else
    #define debug(x...)
    #endif
    /// Debugging shits ends here...
    // templates
    /*#include<ext/pb_ds/assoc_container.hpp>
    #include<ext/pb_ds/tree_policy.hpp>
    using namespace __gnu_pbds;
    /*template <typename T>
    using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

    /// Some frequent usable functions
    #define int                        long long
    void add(int &a,int b){a+=b;if(a>mod)a-=mod;}
    void sub(int &a,int b){a-=b;if(a<0)a+=mod;}
    void mul(int &a, int b) {a=1ll * a * b % mod;}
    template<typename T> T pow(T a,T b, long long m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; }
    // int powmod(int a,int b)
    // {int res = 1;while(b){if(b&1){res = (res * a)%mod;}b= b/2;a = (a*a)%mod;}return res;}
int _ceil(int, int);
int _floor(int a, int b) { return b < 0 ? _floor(-a, -b) : a < 0 ? -_ceil(-a, b) : a / b; }
int _ceil(int a, int b) { return b < 0 ? _ceil(-a, -b) : a < 0 ? -_floor(-a, b) : (a + b - 1) / b; }

    int gcd(int a, int b, int &x, int &y) {if (a == 0) {x = 0; y = 1;return b;
    }int x1, y1;int d = gcd(b%a, a, x1, y1); x = y1 - (b / a) * x1;y = x1;return d;}
    //int find(int v){return v==parent[v]?v:parent[v] = find(parent[v]);}
    // void merge(int i,int j)
    // {i = find(i);j = find(j);if(i == j)return;parent[parent[i]] = parent[j];cmp--;}

    // Directions.......
    /* int dx[] = {1,-1,0,0} , dy[] = {0,0,1,-1}; */ // 4 Direction
    /* int dx[] = {1,-1,0,0,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1,1,-1}; */ // 8 Direction
    /* int dx[] = {1,-1,1,-1,2,2,-2,-2} , dy[] = {2,2,-2,-2,1,-1,1,-1}; */ // Knight moves
    /* int dx[] = {2,-2,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1}; */ // Hexagonal Direction
    #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
    #define sp(a , x) cout << fixed << setprecision(a) << x << endl;
    #define endl "\n"
    #define pb push_back
    #define pf push_front
    #define ub upper_bound
    #define lb lower_bound
    #define F first
    #define S second
    #define mset(a, b) memset(a, b, sizeof a)
    #define sz(x) ((ll)(x.size()))
    #define sqr(x) ((x) * (x))
    #define graph vector<int>
    #define vi vector<int>
    #define vvi vector<vector<int>>
    #define pi pair<int,int>
    #define all(c)                      c.begin() , c.end()
    #define rep(i,a) for(int i=0;i<a;i++)
    #define rrep(i,a,b) for(int i=a;i>=b;i--)
    #define iter(it,a) for(auto it=a.begin();it!=a.end();it++)
    #define PQP priority_queue<pi, vector<pi>, greater<pi>>
    #define PQI priority_queue<int, vector<int>, greater<int>>
    #define dbg debug
    #define inf (int)1e16
    const long double EPS = 0.0000000001;
    const long double PI = (acos(-1));

  /// define some data.......
const int N = 1e6+9;

int check(string s)
{
   if(s.empty())return 0;
   if(s[0]=='0' && s.size()>1)return 0;

   for(int i=0;i<s.size();i++)
   {
     if(!isdigit(s[i]))return 0;
   }

   return 1;
}

  void solve()
 {
    string s;
    cin >> s;
    s=s+";";
    string a="";
    string b="";
        int n = s.size();

    for(int i=0,j=0;i<n;i=j)
    {
        while((j<n) && (s[j]!=';') && (s[j]!=',')){j++;}

        string sub = s.substr(i, j-i);

        if(check(sub)){
          a+=","+sub;
        }
        else{
          b+=","+sub;
        }j++;
    }
    if(a.size()==0)a="-";
    else{
      a = a.substr(1);
    }
    if(b.size()==0)b="-";
    else{
      b = b.substr(1);
    }
    cout<<"\""<<a<<"\""<<"\n";
    cout<<"\""<<b<<"\""<<"\n";

 }

   int32_t main()
   {

     fast;
     int test =1;
     //cin >> test;
     while(test--)
     {
        solve();
     }

    }


#include<bits/stdc++.h>
   #include <ext/pb_ds/tree_policy.hpp>
    #include <ext/pb_ds/assoc_container.hpp>
    using namespace std;
    using namespace __gnu_pbds;

    #define mod 1000000007

    void __print(int x) {cerr << x;}
    void __print(long x) {cerr << x;}
    void __print(long long x) {cerr << x;}
    void __print(unsigned x) {cerr << x;}
    void __print(unsigned long x) {cerr << x;}
    void __print(unsigned long long x) {cerr << x;}
    void __print(float x) {cerr << x;}
    void __print(double x) {cerr << x;}
    void __print(long double x) {cerr << x;}
    void __print(char x) {cerr << '\'' << x << '\'';}
    void __print(const char *x) {cerr << '\"' << x << '\"';}
    void __print(const string &x) {cerr << '\"' << x << '\"';}
    void __print(bool x) {cerr << (x ? "true" : "false");}

    template<typename T, typename V>
    void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
    template<typename T>
    void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
    void _print() {cerr << "]\n";}
    template <typename T, typename... V>
    void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
    #ifndef ONLINE_JUDGE
    #define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
    #else
    #define debug(x...)
    #endif
    /// Debugging shits ends here...
    // templates
    /*#include<ext/pb_ds/assoc_container.hpp>
    #include<ext/pb_ds/tree_policy.hpp>
    using namespace __gnu_pbds;
    /*template <typename T>
    using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

    /// Some frequent usable functions
    #define int                        long long
    void add(int &a,int b){a+=b;if(a>mod)a-=mod;}
    void sub(int &a,int b){a-=b;if(a<0)a+=mod;}
    void mul(int &a, int b) {a=1ll * a * b % mod;}
    template<typename T> T pow(T a,T b, long long m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; }
    // int powmod(int a,int b)
    // {int res = 1;while(b){if(b&1){res = (res * a)%mod;}b= b/2;a = (a*a)%mod;}return res;}
int _ceil(int, int);
int _floor(int a, int b) { return b < 0 ? _floor(-a, -b) : a < 0 ? -_ceil(-a, b) : a / b; }
int _ceil(int a, int b) { return b < 0 ? _ceil(-a, -b) : a < 0 ? -_floor(-a, b) : (a + b - 1) / b; }

    int gcd(int a, int b, int &x, int &y) {if (a == 0) {x = 0; y = 1;return b;
    }int x1, y1;int d = gcd(b%a, a, x1, y1); x = y1 - (b / a) * x1;y = x1;return d;}
    //int find(int v){return v==parent[v]?v:parent[v] = find(parent[v]);}
    // void merge(int i,int j)
    // {i = find(i);j = find(j);if(i == j)return;parent[parent[i]] = parent[j];cmp--;}

    // Directions.......
    /* int dx[] = {1,-1,0,0} , dy[] = {0,0,1,-1}; */ // 4 Direction
    /* int dx[] = {1,-1,0,0,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1,1,-1}; */ // 8 Direction
    /* int dx[] = {1,-1,1,-1,2,2,-2,-2} , dy[] = {2,2,-2,-2,1,-1,1,-1}; */ // Knight moves
    /* int dx[] = {2,-2,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1}; */ // Hexagonal Direction
    #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
    #define sp(a , x) cout << fixed << setprecision(a) << x << endl;
    #define endl "\n"
    #define pb push_back
    #define pf push_front
    #define ub upper_bound
    #define lb lower_bound
    #define F first
    #define S second
    #define mset(a, b) memset(a, b, sizeof a)
    #define sz(x) ((ll)(x.size()))
    #define sqr(x) ((x) * (x))
    #define graph vector<int>
    #define vi vector<int>
    #define vvi vector<vector<int>>
    #define pi pair<int,int>
    #define all(c)                      c.begin() , c.end()
    #define rep(i,a) for(int i=0;i<a;i++)
    #define rrep(i,a,b) for(int i=a;i>=b;i--)
    #define iter(it,a) for(auto it=a.begin();it!=a.end();it++)
    #define PQP priority_queue<pi, vector<pi>, greater<pi>>
    #define PQI priority_queue<int, vector<int>, greater<int>>
    #define dbg debug
    #define inf (int)1e16
    const long double EPS = 0.0000000001;
    const long double PI = (acos(-1));

  /// define some data.......
const int N = 1e6+9;

int check(string s)
{
   if(s.empty())return 0;
   if(s[0]=='0' && s.size()>1)return 0;

   for(int i=0;i<s.size();i++)
   {
     if(!isdigit(s[i]))return 0;
   }

   return 1;
}

  void solve()
 {
    string s;
    cin >> s;
    s=s+";";
    string a="";
    string b="";
        int n = s.size();

    for(int i=0,j=0;i<n;i=j)
    {
        while((j<n) && (s[j]!=';') && (s[j]!=',')){j++;}

        string sub = s.substr(i, j-i);

        if(check(sub)){
          a+=","+sub;
        }
        else{
          b+=","+sub;
        }j++;
    }
    if(a.size()==0){
      cout<<"-"<<"\n";
    }
    else{
      a = a.substr(1);
      cout<<"\""<<a<<"\""<<"\n";
    }
    if(b.size()==0){
      cout<<"-"<<"\n";
    }
    else{
      b = b.substr(1);
      cout<<"\""<<b<<"\""<<"\n";
    }

 }

   int32_t main()
   {

     fast;
     int test =1;
     //cin >> test;
     while(test--)
     {
        solve();
     }

    }


#include<bits/stdc++.h>
   #include <ext/pb_ds/tree_policy.hpp>
    #include <ext/pb_ds/assoc_container.hpp>
    using namespace std;
    using namespace __gnu_pbds;

    #define mod 1000000007

    void __print(int x) {cerr << x;}
    void __print(long x) {cerr << x;}
    void __print(long long x) {cerr << x;}
    void __print(unsigned x) {cerr << x;}
    void __print(unsigned long x) {cerr << x;}
    void __print(unsigned long long x) {cerr << x;}
    void __print(float x) {cerr << x;}
    void __print(double x) {cerr << x;}
    void __print(long double x) {cerr << x;}
    void __print(char x) {cerr << '\'' << x << '\'';}
    void __print(const char *x) {cerr << '\"' << x << '\"';}
    void __print(const string &x) {cerr << '\"' << x << '\"';}
    void __print(bool x) {cerr << (x ? "true" : "false");}

    template<typename T, typename V>
    void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
    template<typename T>
    void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
    void _print() {cerr << "]\n";}
    template <typename T, typename... V>
    void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
    #ifndef ONLINE_JUDGE
    #define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
    #else
    #define debug(x...)
    #endif
    /// Debugging shits ends here...
    // templates
    /*#include<ext/pb_ds/assoc_container.hpp>
    #include<ext/pb_ds/tree_policy.hpp>
    using namespace __gnu_pbds;
    /*template <typename T>
    using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

    /// Some frequent usable functions
    #define int                        long long
    void add(int &a,int b){a+=b;if(a>mod)a-=mod;}
    void sub(int &a,int b){a-=b;if(a<0)a+=mod;}
    void mul(int &a, int b) {a=1ll * a * b % mod;}
    template<typename T> T pow(T a,T b, long long m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; }
    // int powmod(int a,int b)
    // {int res = 1;while(b){if(b&1){res = (res * a)%mod;}b= b/2;a = (a*a)%mod;}return res;}
int _ceil(int, int);
int _floor(int a, int b) { return b < 0 ? _floor(-a, -b) : a < 0 ? -_ceil(-a, b) : a / b; }
int _ceil(int a, int b) { return b < 0 ? _ceil(-a, -b) : a < 0 ? -_floor(-a, b) : (a + b - 1) / b; }

    int gcd(int a, int b, int &x, int &y) {if (a == 0) {x = 0; y = 1;return b;
    }int x1, y1;int d = gcd(b%a, a, x1, y1); x = y1 - (b / a) * x1;y = x1;return d;}
    //int find(int v){return v==parent[v]?v:parent[v] = find(parent[v]);}
    // void merge(int i,int j)
    // {i = find(i);j = find(j);if(i == j)return;parent[parent[i]] = parent[j];cmp--;}

    // Directions.......
    /* int dx[] = {1,-1,0,0} , dy[] = {0,0,1,-1}; */ // 4 Direction
    /* int dx[] = {1,-1,0,0,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1,1,-1}; */ // 8 Direction
    /* int dx[] = {1,-1,1,-1,2,2,-2,-2} , dy[] = {2,2,-2,-2,1,-1,1,-1}; */ // Knight moves
    /* int dx[] = {2,-2,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1}; */ // Hexagonal Direction
    #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
    #define sp(a , x) cout << fixed << setprecision(a) << x << endl;
    #define endl "\n"
    #define pb push_back
    #define pf push_front
    #define ub upper_bound
    #define lb lower_bound
    #define F first
    #define S second
    #define mset(a, b) memset(a, b, sizeof a)
    #define sz(x) ((ll)(x.size()))
    #define sqr(x) ((x) * (x))
    #define graph vector<int>
    #define vi vector<int>
    #define vvi vector<vector<int>>
    #define pi pair<int,int>
    #define all(c)                      c.begin() , c.end()
    #define rep(i,a) for(int i=0;i<a;i++)
    #define rrep(i,a,b) for(int i=a;i>=b;i--)
    #define iter(it,a) for(auto it=a.begin();it!=a.end();it++)
    #define PQP priority_queue<pi, vector<pi>, greater<pi>>
    #define PQI priority_queue<int, vector<int>, greater<int>>
    #define dbg debug
    #define inf (int)1e16
    const long double EPS = 0.0000000001;
    const long double PI = (acos(-1));

  /// define some data.......
const int N = 1e6+9;

int check(string s)
{
    int n = s.size();

  for(int i=0;i<n;i++)
  {
    if(!i && s[i]=='0')return 2;
    if(isdigit(s[i]))continue;
    return 2;
  }
  return 1;
}

  void solve()
 {
    string s;
    cin >> s;
    int n = s.size();
    string a="";
    string b="";
    for(int i=0,j=0;i<n;i=j)
    {
       if(s[i]==';' || s[i]==','){
         j++;
         continue;
       }
       while((j < n) && ((s[j]!=';') && (s[j]!=','))){
         j++;
       }
       cout<<i<<" "<<j<<"\n";
       string sub = s.substr(i, j-i);
        if(check(sub)==1){
          a=a+","+sub;
        }
        else{
          b=b+","+sub;
        }
    }

    a=a.size()>1?a.substr(1):"";
    b=b.size()>1?b.substr(1):"";
    cout<<"\""<<a<<"\""<<"\n"<<"\""<<b<<"\""<<"\n";
 }

   int32_t main()
   {

     fast;
     int test =1;
     //cin >> test;
     while(test--)
     {
        solve();
     }

    }


#include<bits/stdc++.h>
   #include <ext/pb_ds/tree_policy.hpp>
    #include <ext/pb_ds/assoc_container.hpp>
    using namespace std;
    using namespace __gnu_pbds;

    #define mod 1000000007

    void __print(int x) {cerr << x;}
    void __print(long x) {cerr << x;}
    void __print(long long x) {cerr << x;}
    void __print(unsigned x) {cerr << x;}
    void __print(unsigned long x) {cerr << x;}
    void __print(unsigned long long x) {cerr << x;}
    void __print(float x) {cerr << x;}
    void __print(double x) {cerr << x;}
    void __print(long double x) {cerr << x;}
    void __print(char x) {cerr << '\'' << x << '\'';}
    void __print(const char *x) {cerr << '\"' << x << '\"';}
    void __print(const string &x) {cerr << '\"' << x << '\"';}
    void __print(bool x) {cerr << (x ? "true" : "false");}

    template<typename T, typename V>
    void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
    template<typename T>
    void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
    void _print() {cerr << "]\n";}
    template <typename T, typename... V>
    void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
    #ifndef ONLINE_JUDGE
    #define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
    #else
    #define debug(x...)
    #endif
    /// Debugging shits ends here...
    // templates
    /*#include<ext/pb_ds/assoc_container.hpp>
    #include<ext/pb_ds/tree_policy.hpp>
    using namespace __gnu_pbds;
    /*template <typename T>
    using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

    /// Some frequent usable functions
    #define int                        long long
    void add(int &a,int b){a+=b;if(a>mod)a-=mod;}
    void sub(int &a,int b){a-=b;if(a<0)a+=mod;}
    void mul(int &a, int b) {a=1ll * a * b % mod;}
    template<typename T> T pow(T a,T b, long long m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; }
    // int powmod(int a,int b)
    // {int res = 1;while(b){if(b&1){res = (res * a)%mod;}b= b/2;a = (a*a)%mod;}return res;}
int _ceil(int, int);
int _floor(int a, int b) { return b < 0 ? _floor(-a, -b) : a < 0 ? -_ceil(-a, b) : a / b; }
int _ceil(int a, int b) { return b < 0 ? _ceil(-a, -b) : a < 0 ? -_floor(-a, b) : (a + b - 1) / b; }

    int gcd(int a, int b, int &x, int &y) {if (a == 0) {x = 0; y = 1;return b;
    }int x1, y1;int d = gcd(b%a, a, x1, y1); x = y1 - (b / a) * x1;y = x1;return d;}
    //int find(int v){return v==parent[v]?v:parent[v] = find(parent[v]);}
    // void merge(int i,int j)
    // {i = find(i);j = find(j);if(i == j)return;parent[parent[i]] = parent[j];cmp--;}

    // Directions.......
    /* int dx[] = {1,-1,0,0} , dy[] = {0,0,1,-1}; */ // 4 Direction
    /* int dx[] = {1,-1,0,0,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1,1,-1}; */ // 8 Direction
    /* int dx[] = {1,-1,1,-1,2,2,-2,-2} , dy[] = {2,2,-2,-2,1,-1,1,-1}; */ // Knight moves
    /* int dx[] = {2,-2,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1}; */ // Hexagonal Direction
    #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
    #define sp(a , x) cout << fixed << setprecision(a) << x << endl;
    #define endl "\n"
    #define pb push_back
    #define pf push_front
    #define ub upper_bound
    #define lb lower_bound
    #define F first
    #define S second
    #define mset(a, b) memset(a, b, sizeof a)
    #define sz(x) ((ll)(x.size()))
    #define sqr(x) ((x) * (x))
    #define graph vector<int>
    #define vi vector<int>
    #define vvi vector<vector<int>>
    #define pi pair<int,int>
    #define all(c)                      c.begin() , c.end()
    #define rep(i,a) for(int i=0;i<a;i++)
    #define rrep(i,a,b) for(int i=a;i>=b;i--)
    #define iter(it,a) for(auto it=a.begin();it!=a.end();it++)
    #define PQP priority_queue<pi, vector<pi>, greater<pi>>
    #define PQI priority_queue<int, vector<int>, greater<int>>
    #define dbg debug
    #define inf (int)1e16
    const long double EPS = 0.0000000001;
    const long double PI = (acos(-1));

  /// define some data.......
const int N = 1e6+9;

int check(string s)
{
    int n = s.size();
    if(!n)return 2;
    if(n==1 && s[0]=='0'){
           return 1;
    }

  for(int i=0;i<n;i++)
  {
    if(!i && s[i]=='0')return 2;
    if(isdigit(s[i]))continue;
    return 2;
  }
  return 1;
}

  void solve()
 {
    string s;
    cin >> s;
    int n = s.size();
    string a="";
    string b="";
    for(int i=0,j=0;i<n;i=j)
    {
       while((j < n) && ((s[j]!=';') && (s[j]!=','))){
         j++;
       }
       string sub = s.substr(i, j-i);
        if(check(sub)==1){
          a=a+","+sub;
        }
        else{
          b=b+","+sub;
        }
        j++;
    }

    a=a.size()>1?a.substr(1):"";
    b=b.size()>1?b.substr(1):"";
    if(s[n-1]==','|| s[n-1]==';')b+=",";
    cout<<"\""<<a<<"\""<<"\n"<<"\""<<b<<"\""<<"\n";
 }

   int32_t main()
   {

     fast;
     int test =1;
     //cin >> test;
     while(test--)
     {
        solve();
     }

    }


#include <bits/stdc++.h>
using namespace std;
int n,a[200010];

int main()
{
	int t;
	scanf("%d",&t);
	while(t--){
		set<int> st;
		scanf("%d",&n);
		for(int i=1;i<=n;i++) scanf("%d",&a[i]);
		sort(a+1,a+n+1,greater<int>());
		int ans=0;
		for(int i=1;i<=n;i++){
			if(st.count(a[i])) continue;
			while(a[i]%2==0){
				st.insert(a[i]);
				a[i]/=2;
				ans++;
			}
		}
		printf("%d\n",ans);
	}
 return 0;
}


/*
 * socode.online
 *
 * Author: shajingxiang
 * E-mail: 3385764576@qq.com
 * Time  : 2020-02-06 10:30:57
 */
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<set>
#include<map>
#include<vector>
#include<cmath>
#include<iostream>

#define ll long long
#define INF 0x3f3f3f3f
#define LLINF 0x3f3f3f3f3f3f3f3f
#define ls (rt<<1)
#define rs (rt<<1|1)
#define tmid (t[rt].l+t[rt].r>>1)
#define mid (l+r>>1)
#define mod			//
#define N			//

using namespace std;
priority_queue<int> q;
int a, T;
int main(){
	scanf("%d", &T);
	while(T --> 0){
		while(!q.empty()) q.pop();
		int ans = 0, n;
		scanf("%d", &n);
		for(int i = 1; i <= n; i++){
			scanf("%d", &a);
			if(!(a % 2)) q.push(a);
		}
		while(!q.empty()){
			if(q.top() & 1){
				q.pop();
				continue;
			}
			int tmp = q.top();
			while(!q.empty() && q.top() == tmp) q.pop();
			ans++;
			q.push(tmp >> 1);
		}
		printf("%d\n", ans);
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

int main()
{
    fastio;
    int n,t,i,j,a,b;
    cin>>t;
    while(t--)
    {
        cin>>n;
        vector<int>v;
        for(i=0;i<n;i++)
        {
            cin>>a;
            if(!(a & 1))
                v.push_back(a);
        }
        int c=0;
        sort(v.begin(),v.end());
        v.erase(unique(v.begin(),v.end()),v.end());
        for(i=v.size()-1;i>=0;i--)
        {
            while(!(v[i] & 1) && v[i]!=v[i-1])
            {
                v[i]=v[i]>>1;
                sort(v.begin(),v.end());
                c++;
            }
        }
        cout<<c<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

int main()
{
    fastio;
    int n,t,i,j,a,b;
    cin>>t;
    while(t--)
    {
        cin>>n;
        vector<int>v;
        for(i=0;i<n;i++)
        {
            cin>>a;
            if(!(a & 1))
                v.push_back(a);
        }
        int c=0;
        sort(v.begin(),v.end());
        v.erase(unique(v.begin(),v.end()),v.end());
        for(i=v.size()-1;i>=0;i--)
        {
            while(!(v[i] & 1) && v[i]!=v[i-1])
            {
                v[i]=v[i]>>1;
               // sort(v.begin(),v.end());
                c++;
            }
        }
        cout<<c<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

int main()
{
    fastio;
    int n,t,i,j,a,b;
    cin>>t;
    while(t--)
    {
        cin>>n;
        vector<int>v;
        for(i=0;i<n;i++)
        {
            cin>>a;
            if(a % 2==0)
                v.push_back(a);
        }
        int c=0;
        sort(v.begin(),v.end());
        v.erase(unique(v.begin(),v.end()),v.end());
        for(i=v.size()-1;i>=0;i--)
        {
            while(v[i]%2==0 && v[i]!=v[i-1])
            {
                v[i]=v[i]/2;
                sort(v.begin(),v.end());
                c++;
            }
        }
        cout<<c<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

int main()
{
    fastio;
    int n,t,i,j,a,b;
    cin>>t;
    while(t--)
    {
        cin>>n;
        vector<int>v;
        for(i=0;i<n;i++)
        {
            cin>>a;
            if(!(a & 1))
                v.push_back(a);
        }
        int c=0;
        sort(v.begin(),v.end());
        v.erase(unique(v.begin(),v.end()),v.end());
        for(i=v.size()-1;i>=0;i--)
        {
            while(!(v[i] & 1) && v[i]!=v[i-1])
            {
                v[i]=v[i]>>1;
                sort(v.begin(),v.end());
                v.erase(unique(v.begin(),v.end()),v.end());
                c++;
            }
        }
        cout<<c<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

int main()
{
    fastio;
    int n,t,i,j,a,b;
    cin>>t;
    while(t--)
    {
        cin>>n;
        vector<int>v;
        for(i=0;i<n;i++)
        {
            cin>>a;
            if(!(a & 1))
                v.push_back(a);
        }
        int c=0;
        sort(v.begin(),v.end());
        v.erase(unique(v.begin(),v.end()),v.end());
        while(!v.empty()){
            int x=v[v.size()-1];
            v.erase(v.begin()+v.size()-1);
            if(!(x&1))
            {
                v.push_back(x/2);
                v.erase(unique(v.begin(),v.end()),v.end());
                c++;
            }
        }
        cout<<c<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

int main()
{
    fastio;
    int n,t,i,j,a,b;
    cin>>t;
    while(t--)
    {
        cin>>n;
        set<int>s;
        for(i=0;i<n;i++)
        {
            cin>>a;
            if(!(a & 1))
                s.insert(a);
        }
        int c=0;
        while(!s.empty()){
            int x=*s.rbegin();
            s.erase(x);
            if(!(x&1))
            {
                s.insert(x>>1);
                c++;
            }
        }
        cout<<c<<"\n";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

int main()
{
    fastio;
    int n,t,i,j,a,b;
    cin>>t;
    while(t--)
    {
        cin>>n;
        vector<int>v;
        for(i=0;i<n;i++)
        {
            cin>>a;
            if(!(a & 1))
                v.push_back(a);
        }
        int c=0;
        sort(v.begin(),v.end());
        v.erase(unique(v.begin(),v.end()),v.end());
        while(!v.empty()){
            int x=v[v.size()-1];
            v.erase(v.begin()+v.size()-1);
            if(!(x&1))
            {
                v.push_back(x>>1);
                sort(v.begin(),v.end());
                v.erase(unique(v.begin(),v.end()),v.end());
                c++;
            }
        }
        cout<<c<<"\n";
    }
    return 0;
}


// C++ program to find number of ways to arrange
// items under given constraint
#include <bits/stdc++.h>
using namespace std;
  #define ll long long
int main()
{
    ll n,m,i,j;
    ll t;
    cin>>t;
    m=0;
    for(ll ii=0; ii<t; ii++)
    {
        cin>>n;
        map<ll,ll>p;
        vector<ll>a;
        for(i=0; i<n; i++)
        {
            cin>>m;
            if( m%2==0 &&p[m]==0)
             {
                 a.push_back(m);
                 p[m]=1;
             }
        }
        if(a.size()==0)
        {
            cout<<0<<endl;
            continue;
        }
        i=a.size()-1;
       ll s=0;
       while(1)
       {
           sort(a.begin(),a.end());
           for(; i>=0; i--)
            if(a[i]%2==0)
            {
                s++;
                if(p[a[i]/2]==0)
                 {
                     p[a[i]/2]=1;
                     a[i]/=2;
                 }
                else
                 a[i]=999999999;
                break;
            }
            if(i<0)
              break;
       }
        cout<<s<<endl;
    }
    return 0;

}


// C++ program to find number of ways to arrange
// items under given constraint
#include <bits/stdc++.h>
using namespace std;
  #define ll long long
int main()
{
    ll n,m,i,j;
    ll t;
    cin>>t;
    m=0;
    for(ll ii=0; ii<t; ii++)
    {
        cin>>n;
        map<ll,ll>p;
        vector<ll>a;
        for(i=0; i<n; i++)
        {
            cin>>m;
            if( m%2==0 &&p[m]==0)
             {
                 a.push_back(m);
                 p[m]=1;
             }
        }
        i=a.size()-1;
       ll s=0;
       while(1)
       {
           sort(a.begin(),a.end());
           for(; i>=0; i--)
            if(a[i]%2==0)
            {
                s++;
                if(p[a[i]/2]==0)
                 {
                     p[a[i]/2]=1;
                     a[i]/=2;
                 }
                else
                 a[i]=999999999;
                break;
            }
            if(i<0)
              break;
       }
        cout<<s<<endl;
    }
    return 0;

}


// C++ program to find number of ways to arrange
// items under given constraint
#include <bits/stdc++.h>
using namespace std;
  #define ll long long
int main()
{
    ll n,m,i,j;
    ll t;
    cin>>t;
    m=0;
    for(ll ii=0; ii<t; ii++)
    {
        cin>>n;
        map<ll,ll>p;
        vector<ll>a;
        for(i=0; i<n; i++)
        {
            cin>>m;
            if( m%2==0 &&p[m]==0)
             {
                 a.push_back(m);
                 p[m]=1;
             }
        }
        if(a.size()==0)
        {
            cout<<0<<endl;
            continue;
        }
       ll s=0;
        n=a.size();
        sort(a.begin(),a.end());
       for(i=n-1; i>=0; i--)
       {
           p[a[i]]=0;
           while(a[i]%2==0 || p[a[i]]==0)
           {
               s++;
               a[i]/=2;
               if(a[i]%2==1|| p[a[i]]==1)
                break;
                //cout<<a[i]<<endl;

           }
       }
        cout<<s<<endl;
    }
    return 0;

}


#include <bits/stdc++.h>

using namespace std;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
    //freopen("input.txt", "r", stdin);
	int t, n, in;
	set<int> a;
	cin >> t;
	while (t--) {
		cin >> n;
		a.clear();
		for (int i = 0; i < n; ++i) {
			cin >> in; a.insert(in);
		}
		int ans = 0;
		while (!a.empty()) {
			int m = *a.rbegin();
			a.erase(m);
			if (m & 1) {
				ans++;
				a.insert(m / 2);
			}
		}
		cout << ans << endl;
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
    //freopen("input.txt", "r", stdin);
	int t, n, in;
	set<int> a;
	cin >> t;
	while (t--) {
		cin >> n;
		a.clear();
		for (int i = 0; i < n; ++i) {
			cin >> in; a.insert(in);
		}
		int ans = 0;
		while (a.size() > 0) {
			int m = *a.rbegin();
			a.erase(m);
			if (m & 1) {
				ans++;
				a.insert(m / 2);
			}
		}
		cout << ans << endl;
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
    //freopen("input.txt", "r", stdin);
	int t, n, in;
	set<int> a;
	cin >> t;
	while (t--) {
		cin >> n;
		a.clear();
		for (int i = 0; i < n; ++i) {
			cin >> in; a.insert(in);
		}
		int ans = 0;
		while (!a.empty()) {
			int m = *a.rbegin();
			a.erase(m);
			if (!(m & 1)) {
				ans++;
				a.insert(m / 2);
			}
		}
		cout << ans << endl;
	}
	return 0;
}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[100000001];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];}
		/*	if(v[i] > 100000000)
                s[v[i] % 100000000] = 10 ;
            else
			t[v[i]] = 0;
		}*/
		 mergeSort(v, 0, n - 1);
        //cout << (v[0] % 100000000) << endl << s[23456789] << endl;
       j = 0;
       /*for(int j = 0 ; j < n ; j++)
       {
           if(v[j] > 100000000)
           {
               if(v[j] == v[j + 1] || v[j + 1]  == v[j] * 2 )
               {
                   v[j] = 1;
               }
           }
       }
		for (i = n - 1; i >= 0; i--)
		{

            if(v[i] > 100000000 && v[i] % 2 == 0)
                {

                while (v[i] % 2 == 0 )
                {
                    if(v[i] <= 100000000)
                    t[v[i]]++;

                    k++;
                    v[i] = v[i] / 2;
			}
            }
            if(v[i] < 100000001)
            if(t[v[i]] == 0 )
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}*/
		for(i = 0 ; i < n ; i++)
            if(v[i] == v[i + 1])
                v[i] = 1;
		for(i = n - 1 ; i >= 0 ; i--)
        {
            while(v[i] % 2 == 0)
            {
                k++;
                v[i] = v[i] / 2;
              int  m = i / 2;
              int c = m;
              int d = m;
              if(i > 0)
              for(j = i - 1 ; j >= 0 ; j--)
                if(v[j] == v[i])
                v[j] = 1;
               /* if(v[m] < v[i])
                {
                    for(j = m ; j < i ; j++)
                        if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j - 1] ==  v[i] && v[j] != v[i])
                                break;
                }
                if(v[d] > v[i]){
                    for(j = d ; j >= 0 ; j--)
                        if(v[j] == v[i])
                            v[j] = 1;}
                            else if(v[j + 1] ==  v[i] && v[j] != v[i])
                                break;
                if(v[c] == v[i])
               {
                   int p = c;
                   for(j = c ; j >= 0 ; j--)
                    if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j + 1] == v[i] && v[j] != v[i])
                                break;
                   for(j = p ; j < i ; j++)
                    if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j - 1] == v[i] && v[j] != v[i])
                                break;
               }*/
            }
        }
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <set>
int s[100000000];
int t[100000000];
int main()
{
	int t;
	cin >> t;
	int n, i;
	while (t)
	{
		//int result = 0;
		cin >> n;
		set<int> a;
		for (int i = 0; i < n; i++) {
			int elem;
			cin >> elem;
			a.insert(elem);
		}
		int result = 0;
		while (!a.empty()) {
			int m = *a.rbegin();
			a.erase(m);
			if (m % 2 == 0) {
				result++;
				a.insert(m / 2);
			}
		}
		cout << result << endl;
	}

	return 0;
}


#include <iostream>
using namespace std;
#include <set>

int main()
{
	int t;
	cin >> t;
	int n, i;
	while (t)
	{
		//int result = 0;
		cin >> n;
		set<int> a;
		for (int i = 0; i < n; i++) {
			int elem;
			cin >> elem;
			a.insert(elem);
		}
		int result = 0;
		while (!a.empty()) {
			int m = *a.rbegin();
			a.erase(m);
			if (m % 2 == 0) {
				result++;
				a.insert(m / 2);
			}
		}
		cout << result << endl;
	}

	return 0;
}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[100000001];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			if(v[i] < 100000000)
               // s[v[i] % 100000000] = 0;
            //else
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);
       // cout << v[0] % 100000000;
       j = 0;
       for(int j = 0 ; j < n ; j++)
       {
           if(v[j] > 100000000)
           {
               if(v[j] == v[j + 1] || v[j + 1]  == v[j] * 2 )
               {
                   v[j] = 1;
               }
           }
       }
		for (i = n - 1; i >= 0; i--)
		{

            if(v[i] > 100000000 && v[i] % 2 == 0)
                {

                while (v[i] % 2 == 0 )
                {
                    if(v[i] <= 100000000)
                    t[v[i]]++;
                    k++;
                    v[i] = v[i] / 2;
			}
            }
            if(v[i] < 100000001)
            if(t[v[i]] == 0 )
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[500000001];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			if(v[i] > 100000000)
                s[v[i] % 100000000] = 0;
            else
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);
       // cout << v[0] % 100000000;
       j = 0;
       for(int j = 0 ; j < n ; j++)
       {
           if(v[j] > 100000000)
           {
               if(v[j] == v[j + 1] || v[j + 1]  == v[j] * 2 )
               {
                   v[j] = 1;
               }
           }
       }
		for (i = n - 1; i >= 0; i--)
		{

            if(v[i] > 100000000 && v[i] % 2 == 0)
                {

                while (v[i] % 2 == 0 )
                {
                    if(v[i] <= 100000000)
                    t[v[i]]++;

                    k++;
                    v[i] = v[i] / 2;
			}
            }
            if(v[i] < 100000001)
            if(t[v[i]] == 0 )
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
//#include <vector>
long long t[200000];
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			t[i] = 0;
		}
		for (i = 0; i < n; i++)
		{
			if(t[i] == 0)
			while (v[i] % 2 == 0 )
			{
				t[i]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[1000000];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			if(v[i] > 100000000)
                s[v[i] - 100000000] = 0;
            else
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);

		for (i = n - 1; i >= 0; i--)
		{
		   // cout << v[i] << endl;
			if(s[v[i]] == 0 && v[i] > 100000000 && v[i] % 2 == 0)
            {
                s[v[i]]++;
                k++;
                v[i] = v[i] / 2;
            }
			if(t[v[i]] == 0)
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[1000000000];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);

		for (i = n - 1; i >= 0; i--)
		{
		   // cout << v[i] << endl;
			if(t[v[i]] == 0)
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000000];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);

		for (i = n - 1; i >= 0; i--)
		{
		   // cout << v[i] << endl;
			if(t[v[i]] == 0)
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
int t[100000000];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);

		for (i = n - 1; i >= 0; i--)
		{
		   // cout << v[i] << endl;
			if(t[v[i]] == 0)
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
long long t[200000];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);

		for (i = n - 1; i >= 0; i--)
		{
		   // cout << v[i] << endl;
			if(t[v[i]] == 0)
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[100000001];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int binarySearch(long long arr[], int l, int r, int x)
{
    while (l <= r) {
        int m = l + (r - l) / 2;

        // Check if x is present at mid
        if (arr[m] == x)
            return m;

        // If x greater, ignore left half
        if (arr[m] < x)
            l = m + 1;

        // If x is smaller, ignore right half
        else
            r = m - 1;
    }

    // if we reach here, then element was
    // not present
    return -1;
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];}
		/*	if(v[i] > 100000000)
                s[v[i] % 100000000] = 10 ;
            else
			t[v[i]] = 0;
		}*/
		 mergeSort(v, 0, n - 1);
        //cout << (v[0] % 100000000) << endl << s[23456789] << endl;
       j = 0;
       /*for(int j = 0 ; j < n ; j++)
       {
           if(v[j] > 100000000)
           {
               if(v[j] == v[j + 1] || v[j + 1]  == v[j] * 2 )
               {
                   v[j] = 1;
               }
           }
       }
		for (i = n - 1; i >= 0; i--)
		{

            if(v[i] > 100000000 && v[i] % 2 == 0)
                {

                while (v[i] % 2 == 0 )
                {
                    if(v[i] <= 100000000)
                    t[v[i]]++;

                    k++;
                    v[i] = v[i] / 2;
			}
            }
            if(v[i] < 100000001)
            if(t[v[i]] == 0 )
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}*/

		for(i = 0 ; i < n - 1 ; i++)
            if(v[i] == v[i + 1])
                v[i] = 1;
		for(i = n - 1 ; i >= 0 ; i--)
        {
            while(v[i] % 2 == 0)
            {
                k++;
                v[i] = v[i] / 2;
                int c;
             /*   if(v[i] % 2 == 0)
                    for(j = i - 1 ; j >= 0 ; j--)
                    if(v[j] == v[i])
                {
                    v[j] = 1;
                    j = -1;
                }*/
                if(v[i] == 2)
                {
                    for(j = 0 ; j < i ; j++)
                        if(v[j] == 2)
                    {
                        v[j] = 1;
                        j = n;
                    }
                }
                else
               c = binarySearch(v , 0 , i - 1  , v[i]);
             // cout << c << endl;
              if(c != -1)
                v[c] = 1;
               //for(j = 0 ; j < 4 ;j++)
                  //  cout << v[j] <<" ";
                //cout << endl;
               /* if(v[m] < v[i])
                {
                    for(j = m ; j < i ; j++)
                        if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j - 1] ==  v[i] && v[j] != v[i])
                                break;
                }
                if(v[d] > v[i]){
                    for(j = d ; j >= 0 ; j--)
                        if(v[j] == v[i])
                            v[j] = 1;}
                            else if(v[j + 1] ==  v[i] && v[j] != v[i])
                                break;
                if(v[c] == v[i])
               {
                   int p = c;
                   for(j = c ; j >= 0 ; j--)
                    if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j + 1] == v[i] && v[j] != v[i])
                                break;
                   for(j = p ; j < i ; j++)
                    if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j - 1] == v[i] && v[j] != v[i])
                                break;
               }*/

        }}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[100000001];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			//if(v[i] > 100000000)
             //   s[v[i] % 100000000] = 0;
           // else
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);

		for (i = n - 1; i >= 0; i--)
		{
		   // cout << v[i] << endl;
			//if(s[v[i] % 100000000] == 0 && v[i] > 100000000 && v[i] % 2 == 0)
            //{
                //s[v[i]]++;
                //k++;
              //  v[i] = v[i] / 2;
            //}
            if(v[i] > 100000000)
            {
                if(i < n - 1)
                if(v[i] != 2 * v[i + 1] && v[i] % 2 == 0  )
                {
                    v[i] = v[i] / 2;
                    k++;
                    t[v[i]]++;

                }
                if(i == n - 1 && v[i] % 2 == 0)
                {
                    v[i] = v[i] / 2;
                    t[v[i]]++;
                    k++;
                }
                while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}

            }

			if(t[v[i]] == 0 )
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[100000001];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			if(v[i] < 100000000)
               // s[v[i] % 100000000] = 0;
            //else
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);
       // cout << v[0] % 100000000;
       j = 0;
       for(int j = 0 ; j < n ; j++)
       {
           if(v[j] > 100000000)
           {
               if(v[j] == v[j + 1] || v[j] == v[j + 1] * 2)
               {
                   v[j] = 1;
               }
           }
       }
		for (i = n - 1; i >= 0; i--)
		{

            if(v[i] > 100000000 && v[i] % 2 == 0)
                {

                while (v[i] % 2 == 0 )
                {
                    if(v[i] <= 100000000)
                    t[v[i]]++;
                    k++;
                    v[i] = v[i] / 2;
			}
            }
            if(v[i] < 100000001)
            if(t[v[i]] == 0 )
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[100000001];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int binarySearch(long long arr[], int l, int r, int x)
{
    while (l <= r) {
        int m = l + (r - l) / 2;

        // Check if x is present at mid
        if (arr[m] == x)
            return m;

        // If x greater, ignore left half
        if (arr[m] < x)
            l = m + 1;

        // If x is smaller, ignore right half
        else
            r = m - 1;
    }

    // if we reach here, then element was
    // not present
    return -1;
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];}
		/*	if(v[i] > 100000000)
                s[v[i] % 100000000] = 10 ;
            else
			t[v[i]] = 0;
		}*/
		 mergeSort(v, 0, n - 1);
        //cout << (v[0] % 100000000) << endl << s[23456789] << endl;
       j = 0;
       /*for(int j = 0 ; j < n ; j++)
       {
           if(v[j] > 100000000)
           {
               if(v[j] == v[j + 1] || v[j + 1]  == v[j] * 2 )
               {
                   v[j] = 1;
               }
           }
       }
		for (i = n - 1; i >= 0; i--)
		{

            if(v[i] > 100000000 && v[i] % 2 == 0)
                {

                while (v[i] % 2 == 0 )
                {
                    if(v[i] <= 100000000)
                    t[v[i]]++;

                    k++;
                    v[i] = v[i] / 2;
			}
            }
            if(v[i] < 100000001)
            if(t[v[i]] == 0 )
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}*/

		for(i = 0 ; i < n - 1 ; i++)
            if(v[i] == v[i + 1])
                v[i] = 1;
		for(i = n - 1 ; i >= 0 ; i--)
        {
            while(v[i] % 2 == 0)
            {
                k++;
                v[i] = v[i] / 2;
                int c;
                if(v[i] % 2 == 0)
                    for(j = i - 1 ; j >= 0 ; j--)
                    if(v[j] == v[i])
                {
                    v[j] = 1;
                    j = -1;
                }
              // c = binarySearch(v , 0 , i - 1  , v[i]);
              //cout << c << endl;
              //if(c != -1)
               // v[c] = 1;
               //for(j = 0 ; j < 4 ;j++)
                //    cout << v[j] <<" ";
                //cout << endl;
               /* if(v[m] < v[i])
                {
                    for(j = m ; j < i ; j++)
                        if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j - 1] ==  v[i] && v[j] != v[i])
                                break;
                }
                if(v[d] > v[i]){
                    for(j = d ; j >= 0 ; j--)
                        if(v[j] == v[i])
                            v[j] = 1;}
                            else if(v[j + 1] ==  v[i] && v[j] != v[i])
                                break;
                if(v[c] == v[i])
               {
                   int p = c;
                   for(j = c ; j >= 0 ; j--)
                    if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j + 1] == v[i] && v[j] != v[i])
                                break;
                   for(j = p ; j < i ; j++)
                    if(v[j] == v[i])
                            v[j] = 1;
                            else if(v[j - 1] == v[i] && v[j] != v[i])
                                break;
               }*/

        }}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <set>

int main()
{
	int t;
	cin >> t;
	int n, i;
	while (t)
	{
		//int result = 0;
		cin >> n;
		set<int> a;
		for (int i = 0; i < n; i++) {
			int elem;
			cin >> elem;
			a.insert(elem);
		}
		int result = 0;
		while (!a.empty()) {
			int m = *a.rbegin();
			a.erase(m);
			if (m % 2 == 0) {
				result++;
				a.insert(m / 2);
			}
		}
		cout << result << endl;
		t--;
	}

	return 0;
}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
long long t[200000000];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);

		for (i = n - 1; i >= 0; i--)
		{
		   // cout << v[i] << endl;
			if(t[v[i]] == 0)
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
long long t[100000000];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);

		for (i = n - 1; i >= 0; i--)
		{
		   // cout << v[i] << endl;
			if(t[v[i]] == 0)
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include <iostream>
using namespace std;
#include <string>
//#include <algorithm>
#include <vector>
char t[100000001];
char s[100000001];
void merge(long long arr[], int l, int m, int r)
{
    int i, j, k;
    int n1 = m - l + 1;
    int n2 =  r - m;

    /* create temp arrays */
    int L[n1], R[n2];

    /* Copy data to temp arrays L[] and R[] */
    for (i = 0; i < n1; i++)
        L[i] = arr[l + i];
    for (j = 0; j < n2; j++)
        R[j] = arr[m + 1+ j];

    /* Merge the temp arrays back into arr[l..r]*/
    i = 0; // Initial index of first subarray
    j = 0; // Initial index of second subarray
    k = l; // Initial index of merged subarray
    while (i < n1 && j < n2)
    {
        if (L[i] <= R[j])
        {
            arr[k] = L[i];
            i++;
        }
        else
        {
            arr[k] = R[j];
            j++;
        }
        k++;
    }

    /* Copy the remaining elements of L[], if there
       are any */
    while (i < n1)
    {
        arr[k] = L[i];
        i++;
        k++;
    }

    /* Copy the remaining elements of R[], if there
       are any */
    while (j < n2)
    {
        arr[k] = R[j];
        j++;
        k++;
    }
}

/* l is for left index and r is right index of the
   sub-array of arr to be sorted */
void mergeSort(long long arr[], int l, int r)
{
    if (l < r)
    {
        // Same as (l+r)/2, but avoids overflow for
        // large l and h
        int m = l+(r-l)/2;

        // Sort first and second halves
        mergeSort(arr, l, m);
        mergeSort(arr, m+1, r);

        merge(arr, l, m, r);
    }
}
int main()
{
	long long v[200000];
	int n, x, i, j;
	cin >> x;
	while (x)
	{
		int k = 0;

		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> v[i];
			if(v[i] < 100000000)
               // s[v[i] % 100000000] = 0;
            //else
			t[v[i]] = 0;
		}
		 mergeSort(v, 0, n - 1);
       // cout << v[0] % 100000000;
       j = 0;
       for(int j = 0 ; j < n ; j++)
       {
           if(v[j] > 100000000)
           {
               if(v[j] == v[j + 1])
               {
                   v[j] = 1;
               }
           }
       }
		for (i = n - 1; i >= 0; i--)
		{

            if(v[i] > 100000000 && v[i] % 2 == 0)
                {

                while (v[i] % 2 == 0 )
                {
                    if(v[i] <= 100000000)
                    t[v[i]]++;
                    k++;
                    v[i] = v[i] / 2;
			}
            }
            if(v[i] < 100000001)
            if(t[v[i]] == 0 )
			while (v[i] % 2 == 0 )
			{
				t[v[i]]++;
				k++;
				v[i] = v[i] / 2;
			}
		}
		cout << k << endl;
		x--;
	}

}


#include<iostream>
#include<set>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {   //
        int n;
        cin>>n;
        set<int>v;
        for(int i=0;i<n;i++)
        {
            int ti;cin>>ti;
            if(ti%2==0)
            v.insert(ti);
        }

        int count=0;int l=v.size();

        while(l>0)
        {
            set<int> :: iterator it=v.end();it--;
            int big=*it;
            v.erase(big);
            big/=2;
            if(big%2==0)
            v.insert(big);
            l=v.size();
            count++;

        }

        cout<<count<<"\n";

    }
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {   //
        int n;
        cin>>n;
        vector<int>v;
        for(int i=0;i<n;i++)
        {
            int ti;cin>>ti;
            if(ti%2==0)
            v.push_back(ti);
        }
        sort(v.begin(),v.end());

        int count=0;int l=v.size();
        int f=0;
        while(f==0)
        {
            int big=0;f=1;
            for(int i=0;i<l;i++)
            {
                if(v[i]>big && v[i]%2==0)
                {big=v[i];f=0;}
            }

            if(f==0)
            {
                for(int i=0;i<l;i++)
                {
                    if(a[i]==big)
                    a[i]/=2;
                }

            }
            if(f==0)
            count++;
        }

    }
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        vector<int>v;
        for(int i=0;i<n;i++)
        {
            int ti;cin>>ti;
            if(ti%2==0)
            v.push_back(ti);
        }
        sort(v.begin(),v.end());

        int count=0;int l=v.size();
        int f=0;
        while(f==0)
        {
            int big=0;f=1;
            for(int i=0;i<l;i++)
            {
                if(v[i]>big && v[i]%2==0)
                {big=v[i];f=0;}
            }

            if(f==0)
            {
                for(int i=0;i<l;i++)
                {
                    if(a[i]==big)
                    a[i]/=2;
                }

            }
            if(f==0)
            count++;
        }

    }
}


#include<bits/stdc++.h>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        vector<int>v;
        for(int i=0;i<n;i++)
        {
            int ti;cin>>ti;
            if(ti%2==0)
            v.push_back(ti);
        }
        sort(v.begin(),v.end());

        int count=0;int l=v.size();
        while(l>0)
        {
            int x=v[l-1];int c=0,p=l-1;
            while(v[p]==x && p!=-1)
            {p--;c++;}

            while(c--)
            {
                v.pop_back();
            }
            x/=2;
            if(x%2==0)
            {
                v.push_back(x);
            }
            sort(v.begin(),v.end());
            l=v.size();count++;
        }

        cout<<count<<"\n";

    }
}


#include <bits/stdc++.h>

using namespace std;

int main () {
	int t, n, a;
	cin >> t;
	while (t--) {
		cin >> n;
		set <int> s;
		while (n--) {
			cin >> a;
			while (a%2 == 0) {
				if (s.find(a) == s.end())
					s.insert(a);
				a /= 2;
			}
		}
		cout << s.size() << endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

int main () {
	int t, n;
	cin >> t;
	while (t--) {
		cin >> n;
		int arr[n], ans = 0, cnt = 0, flag;
		for (int i=0 ; i<n ; i++) cin >> arr[i];
		sort(arr, arr+n);
		vector <int> v;
		for (int i=0 ; i<n ; i++) {
			if (i == 0 && arr[i]%2 == 0) v.push_back(arr[i]);
			else if (arr[i]%2 == 0 && arr[i] != arr[i-1]) v.push_back(arr[i]);
		}
		for (int i=v.size()-1 ; i>=0 ; i--) {
			flag = 0;
			for (int j=i-1 ; j>=0 ; j--) {
				if (v[i]%v[j] == 0) {
					flag = 1;
					while (v[i] != v[j]) v[i] /= 2, ans++;
					break;
				}
			}
			if (flag == 0) {
				while (v[i]%2 == 0) v[i] /= 2, ans++;
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

int main () {
	int t, n, temp;
	cin >> t;
	while (t--) {
		cin >> n;
		int arr[n], ans = 0, cnt, a;
		vector <int> v;
		for (int i=0 ; i<n ; i++) cin >> arr[i];
		sort(arr, arr+n);
		for (int i=0 ; i<n ; i++) {
			if (i == 0) {
				if (arr[i] % 2 == 0) v.push_back(arr[i]);
			}
			else {
				if (arr[i] % 2 == 0 && arr[i] != arr[i-1]) v.push_back(arr[i]);
			}
		}
		for (int i=0 ; i<v.size() ; i++) {
			a = v[i];
			while (v[i]%2 == 0) v[i] /= 2, ans++;
			for (int j=i+1 ; j<v.size() ; j++) {
				if (v[j]%a == 0) v[j] = (v[j]/a) * v[i];
			}
		}
		cout << ans << endl;
	}
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin >> t;
	while(t--){
		int n,ans=0;
		cin >> n;
		// set<int> s;
		map<int,int> m;
		for(int i=0; i<n; i++){
			int a;
			cin >> a;
			while(!(a&1)){
				// s.insert(a);
				ans += 1 - m[a];
				m[a] = 1;
				a >>= 1;
			}
		}
		// cout << (int)s.size() << endl;
		cout << ans << endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define FOR(x,n) for(int x = 0; x < n; ++x)

int main() {
	int t;
	cin >> t;
	while(t--){
		int n;
		cin >> n;
		vector<int> v;
		map<int,int> m;
		FOR(i,n){
			int a;
			cin >> a;
			// cout << a << " ";
			if(a%2==0){
				v.push_back(a);
				m[a]++;
			}
		}
		// cout << endl;
		sort(v.begin(),v.end(),std::greater<int>());
		// for(int i=0; i<v.size();i++)
		// 	cout << v[i] << " ";
		// 	cout << endl;
		int i=0,mov=0;
		while(i<v.size()){
			// cout << v[i] << " ";
			if(m[v[i]] == 0)
				i++;
			if(m[v[i]] > 0){
				m[v[i]/2] += m[v[i]];
				m[v[i]] = 0;
				v[i] /= 2;
				mov++;
			}
			if(v[i]%2)
				i++;
		}
		// cout << endl;
		cout << mov << endl;
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin >> t;
	while(t--){
		int n;
		cin >> n;
		set<int> s;
		for(int i=0; i<n; i++){
			int a;
			cin >> a;
			while(!(a&1)){
				s.insert(a);
				a >>= 1;
			}
		}
		cout << (int)s.size() << endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int t;
	cin>>t;
	while(t--)
	{
		long long int a,b,c,i,j,n;
		cin>>n;
		set<long long int>s;
		for(i=0;i<n;i++)
		{
			cin>>a;
			s.insert(a);
		}
		n=s.size();
		set<long long int>::iterator it1;
		set<long long int>::iterator it=s.end();
		it--;
		c=0;
		for(it;it!=s.begin();it--)
		{
			if((*it)%2==0)
			{
				a=*it;
				a/=2;
				//it1=it;
				s.erase(it);
				s.insert(a);
				it=s.end();
				c++;
			}
		}
		if(it==s.begin())
		{
			a=*it;
			while(a%2==0)
			{
				a/=2;
				c++;
			}
		}
		//n=s.size();
		cout<<c<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int t;
	cin>>t;
	while(t--)
	{
		long long int a,b,d,i,j,e=0;
		string s,t;
		cin>>s>>t;
		a=s.size();
		b=t.size();
		d=min(a,b);

		e=0;
		int f=0;
		for(i=0;i<d;i++)
		{
			if(e==1)
			break;
			if(s[i]<t[i])
			{
				cout<<s;
				e=1;
				break;
			}
			else if(s[i]==t[i])
			{
				if(i==d-1&&d<b)
				{
					e=1;
					cout<<s;
					break;
				}
				if(i+1>=a)
				{
					e=1;
					cout<<"---";
					break;
				}
				if(e==1)
				break;
				for(j=i+1;j<a;j++)
				{
					if(s[j]<s[i])
					{
						swap(s[j],s[i]);
						e=1;
						cout<<s;
						break;
					}
				}
			}
			if(e==1)
			break;
			else if(s[i]>t[i])
			{
				if(i+1>=a)
				{
					e=1;
					cout<<"---";
					break;
				}
				for(j=i+1;j<a;j++)
				{
					if(s[j]<t[i])
					{
						swap(s[i],s[j]);
						e=1;
						cout<<s;
						break;
					}
				}
				if(e==1)
				break;
				if(e==0)
				{
					//cout<<"here";
					if(i+1>=a)
					{
						e=1;
						cout<<"---";
						break;
					}
					for(j=i+1;j<a;j++)
					{
						if(e==2)
						break;
						if(s[j]==t[i])
						{
							swap(s[i],s[j]);
							e=0;
							for(j=i+1;j<d;j++)
							{
								if(s[j]>=t[j])
								{
									//cout<<"---";
									e=2;
									f++;
									break;
								}
							}
							if(e==0)
							{
								e=1;
								cout<<s;
								break;
							}
						}

					}
					if(e!=1&&f>0)
					{
						e=1;
						cout<<"---";
						break;
					}
				}
			}
		}
		if(e!=1)
		cout<<"---";
		cout<<endl;

	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int t;
	cin>>t;
	while(t--)
	{
		long long int a,b,c,i,j,n;
		cin>>n;
		set<long long int>s;
		for(i=0;i<n;i++)
		{
			cin>>a;
			s.insert(a);
		}
		n=s.size();
		set<long long int>::iterator it1;
		set<long long int>::iterator it=s.end();
		it--;
		c=0;
		for(it;it!=s.begin();it--)
		{
			if((*it)%2==0)
			{
				a=*it;
				a/=2;
				it1=it;
				it1--;
				s.erase(it);
				s.insert(a);

				if(*it1<a)
				it=s.end();
				else
				{
					it=it1;
					it++;
				}
				c++;
			}
		}
		if(it==s.begin())
		{
			a=*it;
			while(a%2==0)
			{
				a/=2;
				c++;
			}
		}
		//n=s.size();
		cout<<c<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
int func(int x)
{
int s=0;
while(x)
{
	if(x%2==1) break;
	s++;
	x/=2;
}
return s;
}
int main()
{
	int tt;cin>>tt;
	while(tt--)
	{
		int n;cin>>n;
		int maxx=0;
		for(int i=1;i<=n;i++)
		{
			int a;cin>>a;
			maxx=max(maxx,func(a));
		}
		cout<<maxx<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
int func(int x)
{
int s=0;
while(x)
{
	if(x%2==1) break;
	s++;
	x/=2;
}
return s;
}
int main()
{
	int tt;cin>>tt;
	while(tt--)
	{
		int n;cin>>n;
	    priority_queue<int>q;
		for(int i=1;i<=n;i++)
		{
		    int a;cin>>a;
		    if(a%2) continue;
		   q.push(a);
		}
	    int s=0;
	    while(!q.empty())
	    {
	    	int c=q.top();
	    	q.pop();
	    	while(!q.empty())
	    	{
	    		int now=q.top() ;
	    		if(c==now)
	    		{
	    			q.pop();
				}else
				{
					break;
				}
			}
			s++;
			if((c/2)%2==0)q.push(c/2);
		}
		cout<<s<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
int a[200010];
int func(int x)
{
int s=0;
while(x)
{
	if(x%2==1) break;
	s++;
	x/=2;
}
return s;
}
int main()
{
	int tt;cin>>tt;
	while(tt--)
	{
		int n;cin>>n;

		for(int i=1;i<=n;i++)
		{
		    cin>>a[i];
		}
		sort(a+1,a+1+n);
		int pos=unique(a+1,a+1+n)-a-1;int s=0;
		for(int i=1;i<=pos;i++)
		{
			s+=func(a[i]);
		}
		cout<<s<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int tt;cin>>tt;
	while(tt--)
	{
		int n;cin>>n;
	    priority_queue<int>q;
		for(int i=1;i<=n;i++)
		{
		    int a;cin>>a;
		    if(a%2) continue;
		   q.push(a);
		}
	    int s=0;
	    while(!q.empty())
	    {
	    	int c=q.top();
	    	q.pop();
	    	while(!q.empty())
	    	{
	    		int now=q.top() ;
	    		if(c==now)
	    		{
	    			q.pop();
				}else
				{
					break;
				}
			}
			s++;
			if((c/2)%2==0)q.push(c/2);
		}
		cout<<s<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        cin >> n;
        vector<uint32_t>vv;
        vector<uint32_t>::iterator it;
        for(int i = 1; i <= n; i++)
        {
            uint32_t te;
            cin >> te;
            if(te % 2 == 0)
            {
                vv.push_back(te);
            }
        }
        sort(vv.begin(), vv.end());
        it = unique(vv.begin(), vv.end());
        vv.resize(std::distance(vv.begin(), it));
        int Co = 0;
        for(; ; )
        {
            if(vv.size() == 0)
            {
                break;
            }
            if(vv[0] == 0 && vv.size() > 1)
            {
                Co++;
                uint32_t tem = vv[1];
                for(int j = 1; j < vv.size(); j++)
                {
                    if(vv[j]%tem == 0)
                    {
                        uint32_t p = vv[j]/2;
                        if(p % 2 == 0)
                        {
                            vv[j] = p;
                        }
                        else
                        {
                            vv[j] = 0;
                        }
                    }
                }
            }
            else if(vv[0] != 0 && vv.size() >= 1)
            {
                Co++;
                uint32_t tem = vv[0];
                for(int j = 0; j < vv.size(); j++)
                {
                    if(vv[j]%tem == 0)
                    {
                        uint32_t p = vv[j]/2;
                        if(p % 2 == 0)
                        {
                            vv[j] = p;
                        }
                        else
                        {
                            vv[j] = 0;
                        }
                    }
                }
            }
            else
            {
                break;
            }
            sort(vv.begin(), vv.end());
            it = unique(vv.begin(), vv.end());
            vv.resize(std::distance(vv.begin(), it));
        }
        cout << Co << endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        cin >> n;
        set<int, greater<int> >sss;
        for(int i = 1;i<= n; i++)
        {
            int tem;
            cin >> tem;
            if(tem % 2== 0)
            {
                sss.insert(tem);
            }
        }
        set<int, greater<int> >::iterator it;
        int Co=0;
        while(sss.size() >= 1)
        {
            it = sss.begin();
            int te = *it/2;
            sss.erase(it);
            if(te % 2 == 0)
            {
                sss.insert(te);
            }
            Co++;
        }
        cout << Co << endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

int main()
{
    int t;
    cin >> t;
    while(t--)
    {
        int n;
        cin >> n;
        priority_queue<unsigned int>vv;
        //vector<uint32_t>::iterator it;
        for(int i = 1; i <= n; i++)
        {
            uint32_t te;
            cin >> te;
            if(te % 2 == 0)
            {
                vv.push(te);
            }
        }
        int Co = 0;
        while(!vv.empty())
        {
            Co++;
            unsigned int  tem = vv.top();
            while(!vv.empty() && tem == vv.top())
            {
                unsigned int p = vv.top();
                vv.pop();
                p = p/2;
                if(p%2 == 0)
                {
                    vv.push(p);
                }
            }

        }
        cout << Co << endl;
    }
    return 0;
}


#include <iostream>
#include <queue>
#include <map>

using namespace std;

int main() {
	int t;
	scanf("%d", &t);
	while(t--) {
		register int n, narr = 0;
		map < int, bool > log;
		priority_queue < int > pq;
		scanf("%d", &n);
		for (int i = 1; i <= n; i++) {
			int tmp;
			scanf("%d", &tmp);
			if (tmp % 2 == 0 && !log[tmp]) {
				pq.push(tmp);
				log[tmp] = true;
				narr++;
			}
		}
		if (narr == 0) {
			printf("0\n");
			continue;
		}

		register int cnt = 0;
		while(!pq.empty()) {
			int tmp = pq.top();
			pq.pop();
			log[tmp] = false;

			cnt++;
			if (tmp % 4 == 0 && !log[tmp / 2]) pq.push(tmp / 2);
		}
		printf("%d\n", cnt);
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <map>

using namespace std;

int arr[200001];

void singleInsertion(int n) {
	for (int i = n; i > 1; i--) {
		if (arr[i] < arr[i - 1]) {
			int tmp = arr[i];
			arr[i] = arr[i - 1];
			arr[i - 1] = tmp;
		}
	}
}

int main() {
	int t;
	scanf("%d", &t);
	while(t--) {
		register int n, narr = 0;
		map < int, bool > log;
		scanf("%d", &n);
		for (int i = 1; i <= n; i++) {
			int tmp;
			scanf("%d", &tmp);
			if (tmp % 2 == 0 && !log[tmp]) {
				arr[++narr] = tmp;
				log[tmp] = true;
			}
		}
		if (narr == 0) {
			printf("0\n");
			continue;
		}
		sort(arr + 1, arr + narr + 1);
		register int cnt = 0;
		while(narr != 0) {
			cnt++;
			register int tmp = arr[narr];
			register int cur = narr - 1;
			while (cur > 0 && arr[cur--] == tmp) {
				narr--;
			}
			tmp /= 2;
			arr[narr] /= 2;
			if (tmp % 2 == 0) singleInsertion(narr);
			else narr--;
		}
		printf("%d\n", cnt);
	}
	return 0;
}


#include <iostream>
#include <algorithm>

using namespace std;

int arr[200001];

void singleInsertion(int n) {
	for (int i = n; i > 1; i--) {
		if (arr[i] < arr[i - 1]) {
			int tmp = arr[i];
			arr[i] = arr[i - 1];
			arr[i - 1] = tmp;
		}
	}
}

int main() {
	int t;
	scanf("%d", &t);
	while(t--) {
		register int n, narr = 0;
		scanf("%d", &n);
		for (int i = 1; i <= n; i++) {
			int tmp;
			scanf("%d", &tmp);
			if (tmp % 2 == 0) {
				arr[++narr] = tmp;
			}
		}
		if (narr == 0) {
			printf("0\n");
			continue;
		}
		sort(arr + 1, arr + narr + 1);
		register int cnt = 0;
		while(narr != 0) {
			cnt++;
			register int tmp = arr[narr];
			register int cur = narr - 1;
			while (cur > 0 && arr[cur--] == tmp) {
				narr--;
			}
			tmp /= 2;
			arr[narr] /= 2;
			if (tmp % 2 == 0) singleInsertion(narr);
			else narr--;
		}
		printf("%d\n", cnt);
	}
	return 0;
}


#include <iostream>
#include <algorithm>

using namespace std;

int arr[200001], n, narr;

void singleInsertion(int n) {
	for (int i = n; i > 1; i--) {
		if (arr[i] < arr[i - 1]) {
			int tmp = arr[i];
			arr[i] = arr[i - 1];
			arr[i - 1] = tmp;
		}
	}
}

int main() {
	int t;
	scanf("%d", &t);
	while(t--) {
		scanf("%d", &n);
		narr = 0;
		for (int i = 1; i <= n; i++) {
			int tmp;
			scanf("%d", &tmp);
			if (tmp % 2 == 0) {
				arr[++narr] = tmp;
			}
		}
		if (narr == 0) {
			printf("0\n");
			continue;
		}
		sort(arr + 1, arr + narr + 1);
		int cnt = 0;
		while(narr != 0) {
			cnt++;
			int tmp = arr[narr];
			int cur = narr - 1;
			while (cur > 0 && arr[cur--] == tmp) {
				narr--;
			}
			tmp /= 2;
			arr[narr] /= 2;
			if (tmp % 2 == 0) singleInsertion(narr);
			else narr--;
		}
		printf("%d\n", cnt);
	}
	return 0;
}


#include <iostream>
#include <algorithm>

using namespace std;

int arr[200001], n, narr;

void singleInsertion(int n) {
	for (int i = n; i > 1; i--) {
		if (arr[i] < arr[i - 1]) {
			int tmp = arr[i];
			arr[i] = arr[i - 1];
			arr[i - 1] = tmp;
		}
	}
}

int main() {
	int t;
	scanf("%d", &t);
	while(t--) {
		scanf("%d", &n);
		narr = 0;
		for (int i = 1; i <= n; i++) {
			int tmp;
			scanf("%d", &tmp);
			if (tmp % 2 == 0) {
				arr[++narr] = tmp;
			}
		}
		if (narr == 0) {
			printf("0\n");
			continue;
		}
		sort(arr + 1, arr + narr + 1);
		int cnt = 0;
		while(narr != 0) {
			cnt++;
			int tmp = arr[narr];
			int cur = narr;
			while (cur > 0 && arr[cur] == tmp) {
				arr[cur] /= 2;
				cur--;
			}
			tmp /= 2;
			if (tmp % 2 == 0) {
				for (int i = narr; i > cur; i--) {
					singleInsertion(i);
				}
			}
			else narr = cur;
		}
		printf("%d\n", cnt);
	}
	return 0;
}


#include<bits/stdc++.h>
#include<algorithm>
#include<string>
#include<cmath>

using namespace std;

long long int arr1[200005];
long long int remainders[1000000005];
//char arr[100005];

int main(void)
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    long long int t;
    cin >> t;
    while(t--)
    {
        for(long long int i=0; i<1000000009;i++)
        {
            remainders[i]=0;
        }
        long long int n,x;
        cin >> n;
        for(long long int i=0; i < n ; i++)
        {
            cin >> x;
            arr1[i] = x;
           // arr2[i] = x;
        }
    sort(arr1,arr1+n, greater<int>());
    // for(int i=0; i< n; i++)
    // {
    //     cout << arr1[i] << " ";
    // }
    // cout << endl;
    long long int ans=0,answer=0;
    long long int answer_array[200005],k=1;
    for(long long int i=0; i< n; i++)
    {
        ans=0;
        long long int num = arr1[i],final;
        if(arr1[i]%2==0)
        {
            while(num%2 == 0)
            {
                num = num/2;
                ans+=1;
                final = num;
            }
            // cout << "ans " << ans << endl;
            // cout <<"final " << final << endl;
            arr1[i] = final;
            //remainders[final] = 1;
            if(remainders[final]!=1 && i!=1)
            {
                remainders[final] = 1;
                answer_array[k++]=ans;
            }
            // for(int i=0; i< n; i++)
            // {
            //     cout << arr1[i] << " ";
            // }
            // cout << endl;
            // cout << "answer"  << answer << endl;
        }
    }
    long long int sum = 0;
    for(long long int i=1; i<k; i++)
    {
        sum+=answer_array[i];
    }
    cout << sum << endl;
    }
    return 0;
}

// for(long long int i=1; i<= ; i++)
// {
// }


#include<bits/stdc++.h>
#include<algorithm>
#include<string>
#include<cmath>

using namespace std;

long long int arr1[200005];
long long int remainders[200005];
//char arr[100005];

int main(void)
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    long long int t;
    cin >> t;
    while(t--)
    {
        for(long long int i=0; i<200005;i++)
        {
            remainders[i]=0;
        }
        long long int n,x;
        cin >> n;
        for(long long int i=0; i < n ; i++)
        {
            cin >> x;
            arr1[i] = x;
           // arr2[i] = x;
        }
    sort(arr1,arr1+n, greater<int>());
    // for(int i=0; i< n; i++)
    // {
    //     cout << arr1[i] << " ";
    // }
    // cout << endl;
    long long int ans=0,answer=0;
    long long int answer_array[200005],k=1;
    for(long long int i=0; i< n; i++)
    {
        ans=0;
        long long int num = arr1[i],final;
        if(arr1[i]%2==0)
        {
            while(num%2 == 0)
            {
                num = num/2;
                ans+=1;
                final = num;
            }
            // cout << "ans " << ans << endl;
            // cout <<"final " << final << endl;
            arr1[i] = final;
            //remainders[final] = 1;
            if(remainders[final]!=1 && i!=1)
            {
                remainders[final] = 1;
                answer_array[k++]=ans;
            }
            // for(int i=0; i< n; i++)
            // {
            //     cout << arr1[i] << " ";
            // }
            // cout << endl;
            // cout << "answer"  << answer << endl;
        }
    }
    long long int sum = 0;
    for(long long int i=1; i<k; i++)
    {
        sum+=answer_array[i];
    }
    cout << sum << endl;
    }
    return 0;
}

// for(long long int i=1; i<= ; i++)
// {
// }


#include<bits/stdc++.h>
using namespace std;

int main(void)
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    set <long long int, greater <long long int> > s; //for desc order

    long long int t;
    cin >> t;
    while(t--)
    {
        long long int n,count = 0;
        cin >> n;
        while(n--)
        {
            long long int x;
            cin >> x;
            if(x%2 == 0)
            {
                s.insert(x);
            }
        }
        while(!(s.empty()))
        {
            long long int number = *(s.begin());
            number = number/2;
            count ++;
            s.erase(*(s.begin()));
            if(number % 2 == 0)
            {
                s.insert(number);
            }
        }
        cout << count << endl;
    }
}