import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

public class Euler736 {
    static final BigInteger START_X = BigInteger.valueOf(45);
    static final BigInteger START_Y = BigInteger.valueOf(90);
    static final int MAX_M = 120;

    static boolean canReachZero(BigInteger x, BigInteger y, int rRem, int sRem) {
        BigInteger pow2S = BigInteger.ONE.shiftLeft(sRem);
        BigInteger pow2R = BigInteger.ONE.shiftLeft(rRem);

        BigInteger term1 = x.multiply(pow2S);
        BigInteger term2 = BigInteger.valueOf(rRem);
        BigInteger term3 = y.multiply(pow2R);
        BigInteger term4 = BigInteger.valueOf(sRem).multiply(pow2R);

        BigInteger minDiff = term1.add(term2).subtract(term3).subtract(term4);

        BigInteger term2Max = BigInteger.valueOf(rRem).multiply(pow2S);
        BigInteger term4Max = BigInteger.valueOf(sRem);

        BigInteger maxDiff = term1.add(term2Max).subtract(term3).subtract(term4Max);

        return minDiff.compareTo(BigInteger.ZERO) <= 0 && maxDiff.compareTo(BigInteger.ZERO) >= 0;
    }

    static class StateKey {
        BigInteger x, y;
        int r, s;

        StateKey(BigInteger x, BigInteger y, int r, int s) {
            this.x = x;
            this.y = y;
            this.r = r;
            this.s = s;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            StateKey stateKey = (StateKey) o;
            return r == stateKey.r && s == stateKey.s && x.equals(stateKey.x) && y.equals(stateKey.y);
        }

        @Override
        public int hashCode() {
            return Objects.hash(x, y, r, s);
        }
    }

    static class SearchSolver {
        int R, S;
        Map<StateKey, Integer> memo;

        SearchSolver(int rTarget, int sTarget) {
            this.R = rTarget;
            this.S = sTarget;
            this.memo = new HashMap<>();
        }

        int countPaths(BigInteger x, BigInteger y, int rUsed, int sUsed) {
            if (rUsed == R && sUsed == S) {
                return x.equals(y) ? 1 : 0;
            }
            if (x.equals(y)) {
                return 0;
            }

            int rRem = R - rUsed;
            int sRem = S - sUsed;

            if (!canReachZero(x, y, rRem, sRem)) {
                return 0;
            }

            StateKey key = new StateKey(x, y, rUsed, sUsed);
            Integer cached = memo.get(key);
            if (cached != null)
                return cached;

            int total = 0;
            if (rUsed < R) {
                total += countPaths(x.add(BigInteger.ONE), y.shiftLeft(1), rUsed + 1, sUsed);
                if (total > 2)
                    total = 2;
            }
            if (sUsed < S && total < 2) {
                total += countPaths(x.shiftLeft(1), y.add(BigInteger.ONE), rUsed, sUsed + 1);
                if (total > 2)
                    total = 2;
            }

            memo.put(key, total);
            return total;
        }

        String reconstructOnePath() {
            StringBuilder path = new StringBuilder();
            BigInteger x = START_X;
            BigInteger y = START_Y;
            int rUsed = 0;
            int sUsed = 0;

            while (rUsed < R || sUsed < S) {
                boolean moved = false;
                if (rUsed < R && countPaths(x.add(BigInteger.ONE), y.shiftLeft(1), rUsed + 1, sUsed) > 0) {
                    path.append('r');
                    x = x.add(BigInteger.ONE);
                    y = y.shiftLeft(1);
                    rUsed++;
                    moved = true;
                } else if (sUsed < S && countPaths(x.shiftLeft(1), y.add(BigInteger.ONE), rUsed, sUsed + 1) > 0) {
                    path.append('s');
                    x = x.shiftLeft(1);
                    y = y.add(BigInteger.ONE);
                    sUsed++;
                    moved = true;
                }

                if (!moved)
                    return null;
            }

            return path.toString();
        }
    }

    static BigInteger applyPathAndFinalValue(String path) {
        BigInteger x = START_X;
        BigInteger y = START_Y;
        for (int i = 0; i < path.length(); ++i) {
            if (path.charAt(i) == 'r') {
                x = x.add(BigInteger.ONE);
                y = y.shiftLeft(1);
            } else {
                x = x.shiftLeft(1);
                y = y.add(BigInteger.ONE);
            }
            if (i + 1 < path.length() && x.equals(y)) {
                return BigInteger.ZERO;
            }
        }
        return x.equals(y) ? x : BigInteger.ZERO;
    }

    public static String solve() {
        for (int m = 0; m <= MAX_M; m += 2) {
            boolean found = false;
            int bestCount = 0;
            BigInteger bestFinalValue = BigInteger.ZERO;

            for (int rTarget = 0; rTarget <= m; ++rTarget) {
                int sTarget = m - rTarget;

                SearchSolver solver = new SearchSolver(rTarget, sTarget);
                int c = solver.countPaths(START_X, START_Y, 0, 0);

                if (c == 0)
                    continue;

                String path = solver.reconstructOnePath();
                if (path == null)
                    continue;

                BigInteger finalValue = applyPathAndFinalValue(path);
                if (finalValue.equals(BigInteger.ZERO))
                    continue;

                if (!found) {
                    found = true;
                    bestCount = c;
                    bestFinalValue = finalValue;
                } else {
                    bestCount = 2;
                }
            }

            if (found) {
                if (bestCount == 1) {
                    return bestFinalValue.toString();
                }
            }
        }

        return null;
    }

    public static void main(String[] args) {
        System.out.println(solve());
    }
}
