#include<bits/stdc++.h> 
using namespace std; 
  
int main(){ 
    int i = 5;
    long long s = 0;
    int c = 0;
    while(1==1){
        s=pow(2,pow(2,i));
        for(int j = 2;j <= sqrt(s);j++){
            if(s % j == 0){
                c++;
                break;
            }
        }
        if(c != 0){
            cout<<i;
            break;  
        }
        i++;
    }
    return 0;
} 
/**************************************************************
	Problem: 1352
	User: linmiaoling
	Language: C++
	Result: Accepted
	Time:5 ms
	Memory:2072 kb
****************************************************************/