#include using namespace std; #define ll long long #define rep(i,n) for(int i=0;i #define Tp tuple #define riano_ std::ios::sync_with_stdio(false);std::cin.tie(nullptr);typedef modint mint using Graph = vector>; const ll mod = 1000000007; template struct modint{ uint64_t val; constexpr modint(const int64_t val_=0) noexcept:val((val_%int64_t(mod)+int64_t(mod))%int64_t(mod)){} constexpr modint operator-() const noexcept{ return modint(*this)=mod-val; } constexpr modint operator+(const modint rhs) const noexcept{ return modint(*this)+=rhs; } constexpr modint operator-(const modint rhs) const noexcept{ return modint(*this)-=rhs; } constexpr modint operator*(const modint rhs) const noexcept{ return modint(*this)*=rhs; } constexpr modint operator/(const modint rhs) const noexcept{ return modint(*this)/=rhs; } constexpr modint &operator+=(const modint rhs) noexcept{ val+=rhs.val; val-=((val>=mod)?mod:0); return (*this); } constexpr modint &operator-=(const modint rhs) noexcept{ val+=((val>=1; } return (*this)*=now; } constexpr bool operator==(const modint rhs) noexcept{ return val==rhs.val; } constexpr bool operator!=(const modint rhs) noexcept{ return val!=rhs.val; } friend constexpr ostream &operator<<(ostream& os,const modint x) noexcept{ return os<<(x.val); } friend constexpr istream &operator>>(istream& is,modint& x) noexcept{ uint64_t t; is>>t,x=t; return is; } }; int main() { riano_; //ll ans = 0; ll K,Q; cin >> K >> Q; vector cand; cand.push_back(K); ll n = K; while(n<=1000000000000000000){ //解から二分探索 binary search //分かれ目の"r"側の値を求める ll l,r,ans; l = 2; r = 1000000000000000002; //初期値の代入 while(l> N; if(N<=K){ cout << N << endl; } else{ ll j = upper_bound(cand.begin(),cand.end(),N) - cand.begin(); cout << cand[j-1] << endl; } } }