但是有另外的性质 q^k=q^(k-1)+q^(k-2)
仔细观察得到等式2q^k>=q^(k-1)+q^(k-2)+...+q^0
如果2数都化为只有1,2位的数会溢出
所以将2数相减与0比较。
令由公式知不断向后加,若有一位>=2或<=-2则正负可知
(2后面那位数即使经过相加,由于要么都之前这位都+(-)1 ) 所以不会出现 -(+)2
0 0 2 -1
+1 +1
+1 +1
如上,后面最小为 (2 ,0 ,-1,-1,...,-1) 还是正的
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<functional>
#include<iostream>
#include<cmath>
#include<cctype>
#include<ctime>
using namespace std;
#define For(i,n) for(int i=1;i<=n;i++)
#define Fork(i,k,n) for(int i=k;i<=n;i++)
#define Rep(i,n) for(int i=0;i<n;i++)
#define ForD(i,n) for(int i=n;i;i--)
#define ForkD(i,k,n) for(int i=n;i>=k;i--)
#define RepD(i,n) for(int i=n;i>=0;i--)
#define Forp(x) for(int p=pre[x];p;p=next[p])
#define Forpiter(x) for(int &p=iter[x];p;p=next[p])
#define Lson (x<<1)
#define Rson ((x<<1)+1)
#define MEM(a) memset(a,0,sizeof(a));
#define MEMI(a) memset(a,127,sizeof(a));
#define MEMi(a) memset(a,128,sizeof(a));
#define INF (2139062143)
#define F (100000007)
#define MAXN (100000+10)
#define eps (1e-3)
long long mul(long long a,long long b){return (a*b)%F;}
long long add(long long a,long long b){return (a+b)%F;}
long long sub(long long a,long long b){return (a-b+(a-b)/F*F+F)%F;}
typedef long long ll;
char s1[MAXN],s2[MAXN];
ll a[MAXN]={0},b[MAXN]={0};
void pushdown(ll a[],int i)
{
a[i-1]+=a[i],a[i-2]+=a[i];
a[i]=0;
}
int main()
{
// freopen("CF457A.in","r",stdin);
// freopen(".out","w",stdout);
scanf("%s%s",s1,s2);
int n1=strlen(s1),n2=strlen(s2);
Rep(i,n1/2) swap(s1[i],s1[n1-i-1]);
Rep(i,n2/2) swap(s2[i],s2[n2-i-1]);
For(i,n1) a[i]=s1[i-1]-'0';
For(i,n2) b[i]=s2[i-1]-'0';
// For(i,n1) cout<<a[i];cout<<endl;
// For(i,n2) cout<<b[i];cout<<endl;
int n=max(n1,n2);
ForD(i,n) a[i]-=b[i];
ForkD(i,3,n)
{
if (a[i]>=2) {cout<<'>'<<endl;return 0; }
else if (a[i]<=-2) {cout<<'<'<<endl;return 0; }
pushdown(a,i);
}
// For(i,n1) cout<<a[i];cout<<endl;
// For(i,n2) cout<<b[i];cout<<endl;
const double q=(1+sqrt(5))/2;
double p=a[1]+a[2]*q;
if (p>eps) putchar('>');
else if (p<-eps) putchar('<');
else putchar('=');
putchar('\n');
return 0;
}