#include <bits/stdc++.h>
#define PI 3.14159265359
#define NIL (-1)
#define LL long long
using namespace std;
const int64_t MOD = 1e9 + 7;

int main() {
	int N;
	cin >> N;

	int ans = INT_MAX;
	for (int i = 0; i < N; i++) {
		int n;
		cin >> n;
		
		int cnt = 0;
		while (n%2==0) {
			if (n / 2) {
				cnt++;
				n /= 2;
			}
			else {
				break;
			}
		}

		ans = min(ans, cnt);
	}

	cout << ans << endl;
}
#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <deque>
using namespace std;

int main() {
    //input
    int n; cin >> n;
    long long sum = 0;
    int counter = 0;
    vector<long> a(n + 1);
    for(int i = 1; i < n + 1; i++) cin >> a[i];
    for(int i = 1; i < n + 1; i++){
        if(a[i] < 0){
           counter += 1; 
        }
        a[i] = abs(a[i]);
    }

    sort(a.begin() + 1, a.end());
    for(int i = 1; i < n + 1; i++) sum += a[i];

    if(counter % 2 == 0 ){
      cout << sum << endl;
    }else{
      cout << sum - 2 * a[1] << endl;
    }
    
    //output
}