import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		ArrayList<Integer> array = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			array.add(Integer.parseInt(sc.next()));
		}
		Integer[] list = array.toArray(new Integer[array.size()]);

		System.out.println(threeOrTwo(n, list));
		sc.close();
	}

	public static int threeOrTwo(int n, Integer list[]) {
		int count = 0;
		while (true) {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		ArrayList<Integer> array = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			array.add(Integer.parseInt(sc.next()));
		}
		Integer[] list = array.toArray(new Integer[array.size()]);

		System.out.println(threeOrTwo(n, list));
		sc.close();
	}

	public static int threeOrTwo(int n, Integer list[]) {
		int count = 0;
		while (true) {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		ArrayList<Integer> array = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			array.add(Integer.parseInt(sc.next()));
		}
		Integer[] list = array.toArray(new Integer[array.size()]);

		System.out.println(threeOrTwo(n, list));
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		ArrayList<Integer> array = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			array.add(Integer.parseInt(sc.next()));
		}
		Integer[] list = array.toArray(new Integer[array.size()]);

		System.out.println(threeOrTwo(n, list));
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc ArrayList<Integer> array = new ArrayList<>(); array new ArrayList<>() for (int i = 0; i < n; i++) {
			array.add(Integer.parseInt(sc.next()));
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			array.add(Integer.parseInt(sc.next()));
		} {
			array.add(Integer.parseInt(sc.next()));
		} array.add(Integer.parseInt(sc.next())) array.add array Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc Integer[] list = array.toArray(new Integer[array.size()]); list array.toArray(new Integer[array.size()]) array.toArray array new Integer[array.size()] array.size() array.size array System.out.println(threeOrTwo(n, list)) System.out.println System.out System System.out threeOrTwo(n, list) threeOrTwo n list sc.close() sc.close sc String[] args args public static int threeOrTwo(int n, Integer list[]) {
		int count = 0;
		while (true) {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		}
	} threeOrTwo {
		int count = 0;
		while (true) {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		}
	} int count = 0; count 0 while (true) {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		} true {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		} int even = 0; even 0 for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			} {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			} if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} list[i] % 2 == 0 list[i] % 2 list[i] list i 2 0 {
					list[i] = list[i] / 2;
					even++;
					break;
				} list[i] = list[i] / 2 list[i] list i list[i] / 2 list[i] list i 2 even++ even break; if (even ==  0) {
				return count;
			} else {
				count++;
			} even ==  0 even 0 {
				return count;
			} return count; count {
				count++;
			} count++ count int n n Integer list[] list public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		ArrayList<Integer> array = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			array.add(Integer.parseInt(sc.next()));
		}
		Integer[] list = array.toArray(new Integer[array.size()]);

		System.out.println(threeOrTwo(n, list));
		sc.close();
	}

	public static int threeOrTwo(int n, Integer list[]) {
		int count = 0;
		while (true) {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		ArrayList<Integer> array = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			array.add(Integer.parseInt(sc.next()));
		}
		Integer[] list = array.toArray(new Integer[array.size()]);

		System.out.println(threeOrTwo(n, list));
		sc.close();
	}

	public static int threeOrTwo(int n, Integer list[]) {
		int count = 0;
		while (true) {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		}
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		ArrayList<Integer> array = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			array.add(Integer.parseInt(sc.next()));
		}
		Integer[] list = array.toArray(new Integer[array.size()]);

		System.out.println(threeOrTwo(n, list));
		sc.close();
	}

	public static int threeOrTwo(int n, Integer list[]) {
		int count = 0;
		while (true) {
			int even = 0;
			for (int i = 0; i < n; i++) {
				if (list[i] % 2 == 0) {
					list[i] = list[i] / 2;
					even++;
					break;
				} 
			}
			if (even ==  0) {
				return count;
			} else {
				count++;
			}
		}
	}
}