      PROGRAM B
      IMPLICIT NONE
      INTEGER :: N, i, ans, f,g, counter, index, s
      INTEGER,ALLOCATABLE :: A(:)
      LOGICAL :: flag1
      
      read*,N
      ALLOCATE( A(N) )
      read*,A(1:N)
      
      ans = 0
      flag1 = .false.

      
      outer:DO s = 1,10**9
      
        inner:DO index=1,N
          IF( .not.MOD(A(index),2)==0 )THEN
            flag1 = .true.
          END IF
        END DO inner
        
        IF(flag1)THEN
          EXIT
        END IF
        A(:) = A(:)/2
        ans = ans + 1
        
      END DO outer
      
      
      
      print'(I0)', ans
      
      
      
      
      END PROGRAM