#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const double EPSILON = 1e-10;
template <class T>
inline T tmin(T a, T b) {
  return (a < b) ? a : b;
}
template <class T>
inline T tmax(T a, T b) {
  return (a > b) ? a : b;
}
template <class T>
inline T tabs(T a) {
  return (a > 0) ? a : -a;
}
template <class T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  string s1, s2;
  long long a1[100005], a2[100005];
  cin >> s1 >> s2;
  int n1 = s1.size(), n2 = s2.size();
  for (int i = (0); i < (n1 / 2); ++i) {
    char tmp = s1[i];
    s1[i] = s1[n1 - 1 - i];
    s1[n1 - 1 - i] = tmp;
  }
  for (int i = (0); i < (n2 / 2); ++i) {
    char tmp = s2[i];
    s2[i] = s2[n2 - 1 - i];
    s2[n2 - 1 - i] = tmp;
  }
  if (n1 < n2) {
    for (int i = (0); i < (n2 - n1); ++i) s1 += '0';
  } else if (n1 > n2) {
    for (int i = (0); i < (n1 - n2); ++i) s2 += '0';
  }
  int n = tmax(n1, n2);
  for (int i = (0); i < (n); ++i) {
    a1[i] = s1[i] - '0';
    a2[i] = s2[i] - '0';
  }
  for (int i = (n - 1); i >= (2); --i) {
    a1[i - 1] += a1[i];
    a1[i - 2] += a1[i];
    a2[i - 1] += a2[i];
    a2[i - 2] += a2[i];
    long long bias = tmin(a1[i - 1], a2[i - 1]);
    a1[i - 1] -= bias;
    a2[i - 1] -= bias;
    bias = tmin(a1[i - 2], a2[i - 2]);
    a1[i - 2] -= bias;
    a2[i - 2] -= bias;
    if (a1[i - 1] > 100000 + a2[i - 2]) {
      printf(">\n");
      return 0;
    }
    if (a2[i - 1] > 100000 + a1[i - 2]) {
      printf("<\n");
      return 0;
    }
  }
  if (n < 2) {
    a1[1] = 0;
    a2[1] = 0;
  }
  long long q1 = a1[0] - a2[0], q2 = a1[1] - a2[1];
  double q = 0.5 * (sqrt(5) + 1), diff = q * q2 + q1;
  if (diff > EPSILON)
    printf(">\n");
  else if (tabs(diff) < EPSILON)
    printf("=\n");
  else
    printf("<\n");
  return 0;
}
