#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); // n = 2^m F1 F2, ..., Fk vector F = {3, 5, 17, 257, 65537}; vector B; int sz = F.size(); rep(S,1<> A; cout << upper_bound(B.begin(), B.end(), A) - B.begin() - 2 << endl; }