#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back

LL n;
LL F[91];
vector<int> seq;
vector<int> ans;

int main()
{
	cin>>n;
	F[1]=F[2]=1;
	for(int i=3;i<=90;i++)
		F[i]=F[i-1]+F[i-2];
	for(int i=90;i>=1;i--)
		if(n>=F[i]) n-=F[i],seq.pb(1);
		else if(seq.size()) seq.pb(0);
	reverse(seq.begin(),seq.end());
	seq.pop_back();
	reverse(seq.begin(),seq.end());
	int P=seq.size()&1;
	ans.pb(1+P);
	for(int i=0;i<seq.size();i++)
	{
		P=1-P;
		ans.pb(3+P);
		if(seq[i]) ans.pb(1+P);
	}
	cout<<ans.size()<<'\n';
	for(int i=0;i<ans.size();i++)
		cout<<ans[i]<<'\n';
	
	return 0;
}
//GIVE ME AC!!!!!!!!!!!!!!!!!
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#define ll int
#define ld long double
#define floatset() fixed<<setprecision(15)
#define all(n) n.begin(),n.end()
#define rall(n) n.rbegin(),n.rend()
#define rep(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define pb push_back
#define eb emplace_back
#define INT(...) int __VA_ARGS__;scan(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;scan(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;scan(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;scan(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;scan(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;scan(__VA_ARGS__)
using namespace std;
using vl=vector<ll>;
using vi=vector<int>;
using vs=vector<string>;
using vc=vector<char>;
using vvl=vector<vl>;
using P=pair<ll,ll>;
using vvc=vector<vc>;
using vd=vector<double>;
using vp=vector<P>;
using vb=vector<bool>;
using P=pair<ll,ll>;
const int dx[8]={1,0,-1,0,1,-1,-1,1};
const int dy[8]={0,1,0,-1,1,1,-1,-1};
const ll MOD=1000000007;
const ll mod=998244353;
const double pi=acos(-1);
template<typename T1,typename T2 >
ostream &operator<<(ostream&os,const pair<T1,T2>&p) {
  os<<p.first<<" "<<p.second;
  return os;
}
template<typename T1,typename T2>
istream &operator>>(istream&is,pair<T1,T2>&p) {
  is>>p.first>>p.second;
  return is;
}
template<typename T>
ostream &operator<<(ostream&os,const vector<T>&v) {
  for(int i=0;i<(int)v.size();i++) {
    os<<v[i]<<(i+1!=v.size()?" ":"");
  }
  return os;
}
template<typename T>
istream &operator>>(istream&is,vector<T>&v) {
  for(T &in:v)is>>in;
  return is;
}
void scan(){}
template<class Head,class... Tail>
void scan(Head&head,Tail&... tail) {
    cin>>head;
    scan(tail...);
}
template<class T>
void print(const T &t) { cout << t << '\n'; }
template<class Head, class... Tail>
void print(const Head &head, const Tail &... tail) {
    cout << head << ' ';
    print(tail...);
}
template<class... T>
void fin(const T &... a) {
    print(a...);
    exit(0);
}
template<typename T1,typename T2>
inline bool chmax(T1&a,T2 b){return a<b&&(a=b,true);}
template<typename T1,typename T2>
inline bool chmin(T1&a,T2 b){return a>b&&(a=b,true);}
vector<ll>prime_factorize(ll N) {
  vector<ll>res;
    for (ll a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        while (N % a == 0) {
            N /= a;
        }
        res.push_back(a);
      if(N==1)break;
    }
    if (N != 1) res.push_back(N);
    return res;
}
int main(){
  LL(l,r);
  long long ans=0;
  rep(i,max(2,l),r+1){
    vl p=prime_factorize(i);
    ll cnt=0;
    ll s=p.size();
    rep(bit,1,(1<<s)){
      ll now=1;
      rep(j,0,p.size()){
        if((bit>>j)&1){
          now*=p[j];
        }
      }
      ll res=(r/now)-((i-1)/now);
      if(__builtin_popcount(bit)%2==1){
        cnt+=res;
      }
      else{
        cnt-=res;
      }
    }
    ans+=cnt;
  }
  rep(i,max(2,l),r+1){
    ans-=r/i;
  }
  fin(ans*2);
}