There are n positive integers a_1, a_2, ..., a_n. For the one move you can choose any even value c and divide by two all elements that equal c.

For example, if a=[6,8,12,6,3,12] and you choose c=6, and a is transformed into a=[3,8,12,3,3,12] after the move.

You need to find the minimal number of moves for transforming a to an array of only odd integers (each element shouldn't be divisible by 2).

Input

The first line of the input contains one integer t (1 ≤ t ≤ 10^4) — the number of test cases in the input. Then t test cases follow.

The first line of a test case contains n (1 ≤ n ≤ 2⋅10^5) — the number of integers in the sequence a. The second line contains positive integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^9).

The sum of n for all test cases in the input doesn't exceed 2⋅10^5.

Output

For t test cases print the answers in the order of test cases in the input. The answer for the test case is the minimal number of moves needed to make all numbers in the test case odd (i.e. not divisible by 2).

Example

Input


4
6
40 6 40 3 20 1
1
1024
4
2 4 8 16
3
3 1 7


Output


4
10
4
0

Note

In the first test case of the example, the optimal sequence of moves can be as follows:

  * before making moves a=[40, 6, 40, 3, 20, 1]; 
  * choose c=6; 
  * now a=[40, 3, 40, 3, 20, 1]; 
  * choose c=40; 
  * now a=[20, 3, 20, 3, 20, 1]; 
  * choose c=20; 
  * now a=[10, 3, 10, 3, 10, 1]; 
  * choose c=10; 
  * now a=[5, 3, 5, 3, 5, 1] — all numbers are odd. 



Thus, all numbers became odd after 4 moves. In 3 or fewer moves, you cannot make them all odd.
import javax.print.DocFlavor;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.IllegalCharsetNameException;
import java.sql.SQLOutput;
import java.util.*;



public class Main {
    static int[] arr;
    static boolean[] v;
    static long[] ans;
    static int n;
    static int[] parity;

    public static void main(String[] args) throws IOException{
        Reader.init(System.in);
        int q = Reader.nextInt();
        while (q-->0){
            solve();
        }

    }

    static long fun(int pp , int i  , int hops){
        if (i<0 || i >= n){
            return Long.MAX_VALUE;
        }
        if (v[i]==true){
            if ((pp ^ parity[i])==1){
                return hops;
            }
            else{
                if (ans[i]==Long.MAX_VALUE) {
                    return Long.MAX_VALUE;
                }
                else{
                    return ans[i] + 1;
                }
            }
        }
        if ((pp ^ parity[i])==1){
            return 1;
        }
        v[i] = true;
        long num1 = fun(parity[i] , i + arr[i] , 1);
        long num2 = fun(parity[i] , i - arr[i] , 1);
        ans[i] = Math.min(num1,num2);
        if (ans[i]==Long.MAX_VALUE){
            return ans[i];
        }
        else{
            return ans[i] + 1;
        }

    }







    /*static int find(int x) {
        return parent[x] == x ? x : (parent[x] = find(parent[x]));
    }
    static void merge(int x, int y) {
        x = find(x);
        y = find(y);
        if ( x > y ){
            parent[y] = x;
        }
        else if (y > x){
            parent[x] = y;
        }
    }*/

    static void solve()throws IOException{
        int n = Reader.nextInt();
        HashMap<Integer,Integer> map = new HashMap<>();
        TreeSet<Integer> set = new TreeSet<>();
        for (int i = 0 ; i < n ; i++){
            int num = Reader.nextInt();
            if (num%2==0) {
                set.add(num);
                if (map.containsKey(num)){
                    map.put(num,map.get(num) + 1);
                }
                else{
                    map.put(num,1);
                }
            }
        }
        int ans = 0;
        while (!set.isEmpty()){
            int num = set.last();
            set.remove(num);
            num/=2;
            if (num%2==0){
                set.add(num);
            }
            ans++;
        }
        System.out.println(ans);
    }


    public static void sortbyColumn(int arr[][], int col)
    {
        // Using built-in sort function Arrays.sort
        Arrays.sort(arr, new Comparator<int[]>() {

            @Override
            // Compare values according to columns
            public int compare(final int[] entry1,
                               final int[] entry2) {

                // To sort in descending order revert
                // the '>' Operator
                if (entry1[col] > entry2[col])
                    return 1;
                else
                    return -1;
            }
        });  // End of function call sort().
    }


    static class Node{
        long a;
        int i;
        Node(long a, int i){
            this.a = a;
            this.i = i;
        }
    }

}


class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }
    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}
class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

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


        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

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

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

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

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

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }

    /* A utility function to print array of size n */
    static void printArray(int arr[])
    {
        int n = arr.length;
        for (int i=0; i<n; ++i)
            System.out.print(arr[i] + " ");
        System.out.println();
    }

    // Driver method

}

class Node implements Comparable<Node>{
    int a;
    int b;
    Node (int a , int b){
        this.a = a;
        this.b = b;
    }



    public int compareTo(Node o) {
        if ((this.a%2) == (o.a%2)){
            return (this.b - o.b);
        }
        else{
            return this.a - o.a;
        }
    }
}