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

public class Main {

	public static void main(String[] args) {
		ShiftOnly solver = new ShiftOnly();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}

	static class ShiftOnly {

		private int n;
		private ArrayList<Integer> aInput;

		private Scanner scanner;

		private String answer;

		public ShiftOnly() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			aInput = new ArrayList<Integer>();
			n = scanner.nextInt();
			for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			}
		}

		public void solve() {
			int o = 0;
			while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			}
		}

		public void writeOutput() {
			System.out.println(answer);
		}

	}


} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		ShiftOnly solver = new ShiftOnly();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}

	static class ShiftOnly {

		private int n;
		private ArrayList<Integer> aInput;

		private Scanner scanner;

		private String answer;

		public ShiftOnly() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			aInput = new ArrayList<Integer>();
			n = scanner.nextInt();
			for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			}
		}

		public void solve() {
			int o = 0;
			while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			}
		}

		public void writeOutput() {
			System.out.println(answer);
		}

	}


} Main public static void main(String[] args) {
		ShiftOnly solver = new ShiftOnly();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	} main {
		ShiftOnly solver = new ShiftOnly();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	} ShiftOnly solver = new ShiftOnly(); solver new ShiftOnly() solver.readInput() solver.readInput solver solver.solve() solver.solve solver solver.writeOutput() solver.writeOutput solver String[] args args static class ShiftOnly {

		private int n;
		private ArrayList<Integer> aInput;

		private Scanner scanner;

		private String answer;

		public ShiftOnly() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			aInput = new ArrayList<Integer>();
			n = scanner.nextInt();
			for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			}
		}

		public void solve() {
			int o = 0;
			while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			}
		}

		public void writeOutput() {
			System.out.println(answer);
		}

	} ShiftOnly private int n; n private ArrayList<Integer> aInput; aInput private Scanner scanner; scanner private String answer; answer public ShiftOnly() {
			this.scanner = new Scanner(System.in);
		} ShiftOnly {
			this.scanner = new Scanner(System.in);
		} this.scanner = new Scanner(System.in) this.scanner this this.scanner new Scanner(System.in) public void readInput() {
			aInput = new ArrayList<Integer>();
			n = scanner.nextInt();
			for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			}
		} readInput {
			aInput = new ArrayList<Integer>();
			n = scanner.nextInt();
			for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			}
		} aInput = new ArrayList<Integer>() aInput new ArrayList<Integer>() n = scanner.nextInt() n scanner.nextInt() scanner.nextInt scanner for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				Integer b =scanner.nextInt();
				aInput.add(b);
			} {
				Integer b =scanner.nextInt();
				aInput.add(b);
			} Integer b =scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner aInput.add(b) aInput.add aInput b public void solve() {
			int o = 0;
			while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			}
		} solve {
			int o = 0;
			while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			}
		} int o = 0; o 0 while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			} true {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			} for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				} Integer a aInput {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				} {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				} aInput.set(aInput.indexOf(a), a>>1) aInput.set aInput aInput.indexOf(a) aInput.indexOf aInput a a>>1 a 1 if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					} Integer.lowestOneBit(a) == 1 Integer.lowestOneBit(a) Integer.lowestOneBit Integer a 1 {
						answer = String.valueOf(o);
						return;
					} answer = String.valueOf(o) answer String.valueOf(o) String.valueOf String o return; o++ o public void writeOutput() {
			System.out.println(answer);
		} writeOutput {
			System.out.println(answer);
		} System.out.println(answer) System.out.println System.out System System.out answer public class Main {

	public static void main(String[] args) {
		ShiftOnly solver = new ShiftOnly();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}

	static class ShiftOnly {

		private int n;
		private ArrayList<Integer> aInput;

		private Scanner scanner;

		private String answer;

		public ShiftOnly() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			aInput = new ArrayList<Integer>();
			n = scanner.nextInt();
			for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			}
		}

		public void solve() {
			int o = 0;
			while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			}
		}

		public void writeOutput() {
			System.out.println(answer);
		}

	}


} public class Main {

	public static void main(String[] args) {
		ShiftOnly solver = new ShiftOnly();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}

	static class ShiftOnly {

		private int n;
		private ArrayList<Integer> aInput;

		private Scanner scanner;

		private String answer;

		public ShiftOnly() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			aInput = new ArrayList<Integer>();
			n = scanner.nextInt();
			for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			}
		}

		public void solve() {
			int o = 0;
			while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			}
		}

		public void writeOutput() {
			System.out.println(answer);
		}

	}


} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		ShiftOnly solver = new ShiftOnly();
		solver.readInput();
		solver.solve();
		solver.writeOutput();
	}

	static class ShiftOnly {

		private int n;
		private ArrayList<Integer> aInput;

		private Scanner scanner;

		private String answer;

		public ShiftOnly() {
			this.scanner = new Scanner(System.in);
		}

		public void readInput() {
			aInput = new ArrayList<Integer>();
			n = scanner.nextInt();
			for(int i=0; i<n; i++) {
				Integer b =scanner.nextInt();
				aInput.add(b);
			}
		}

		public void solve() {
			int o = 0;
			while(true) {
				for(Integer a :aInput) {
					aInput.set(aInput.indexOf(a), a>>1);
					if(Integer.lowestOneBit(a) == 1) {
						answer = String.valueOf(o);
						return;
					}
				}
				o++;
			}
		}

		public void writeOutput() {
			System.out.println(answer);
		}

	}


}
