Problem: Shakespeare is a widely known esoteric programming language in which programs look like plays by Shakespeare, and numbers are given by combinations of ornate epithets. In this problem we will have a closer look at the way the numbers are described in Shakespeare.

Each constant in Shakespeare is created from non-negative powers of 2 using arithmetic operations. For simplicity we'll allow only addition and subtraction and will look for a representation of the given number which requires a minimal number of operations.

You are given an integer n. You have to represent it as n = a1 + a2 + ... + am, where each of ai is a non-negative power of 2, possibly multiplied by -1. Find a representation which minimizes the value of m.

Input

The only line of input contains a positive integer n, written as its binary notation. The length of the notation is at most 106. The first digit of the notation is guaranteed to be 1.

Output

Output the required minimal m. After it output m lines. Each line has to be formatted as "+2^x" or "-2^x", where x is the power coefficient of the corresponding term. The order of the lines doesn't matter.

Examples

Input

1111


Output

2
+2^4
-2^0


Input

1010011


Output

4
+2^0
+2^1
+2^4
+2^6

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int MAXN = (1 << 20);
const int inf = (int)1e9 + 42;
struct node {
  int mn, pos, lazy;
  node() {
    mn = inf;
    pos = -1;
    lazy = 0;
  }
  node(int val, int p) {
    mn = val;
    pos = p;
    lazy = 0;
  }
};
node temp, broken;
node merge(node l, node r) {
  temp.mn = min(l.mn, r.mn);
  temp.lazy = 0;
  if (temp.mn == l.mn)
    temp.pos = l.pos;
  else
    temp.pos = r.pos;
  return temp;
}
struct segment_tree {
  node tr[4 * MAXN];
  void push(int l, int r, int idx) {
    if (tr[idx].lazy) {
      tr[idx].mn += tr[idx].lazy;
      if (l != r) {
        tr[2 * idx + 1].lazy += tr[idx].lazy;
        tr[2 * idx + 2].lazy += tr[idx].lazy;
      }
      tr[idx].lazy = 0;
    }
  }
  void init(int l, int r, int idx) {
    if (l == r) {
      tr[idx] = node(0, l);
      return;
    }
    int mid = (l + r) >> 1;
    init(l, mid, 2 * idx + 1);
    init(mid + 1, r, 2 * idx + 2);
    tr[idx] = merge(tr[2 * idx + 1], tr[2 * idx + 2]);
  }
  void update(int qL, int qR, int val, int l, int r, int idx) {
    push(l, r, idx);
    if (qL > r || l > qR) return;
    if (qL <= l && r <= qR) {
      tr[idx].lazy += val;
      push(l, r, idx);
      return;
    }
    int mid = (l + r) >> 1;
    update(qL, qR, val, l, mid, 2 * idx + 1);
    update(qL, qR, val, mid + 1, r, 2 * idx + 2);
    tr[idx] = merge(tr[2 * idx + 1], tr[2 * idx + 2]);
  }
  node query(int qL, int qR, int l, int r, int idx) {
    push(l, r, idx);
    if (l > qR || r < qL) return broken;
    if (qL <= l && r <= qR) return tr[idx];
    int mid = (l + r) >> 1;
    return merge(query(qL, qR, l, mid, 2 * idx + 1),
                 query(qL, qR, mid + 1, r, 2 * idx + 2));
  }
};
int n;
string s;
void read() {
  cin >> s;
  n = s.size();
}
segment_tree t;
int type[MAXN], dp[MAXN], last[MAXN];
void solve() {
  t.init(0, n, 0);
  dp[n] = 0;
  t.update(n, n, 0, 0, n, 0);
  for (int i = n - 1; i >= 0; i--) {
    dp[i] = inf;
    if (s[i] == '0') {
      dp[i] = dp[i + 1];
      t.update(i + 1, n, 1, 0, n, 0);
      t.update(i, i, dp[i], 0, n, 0);
      type[i] = 0;
    } else {
      node ret_seg = t.query(i + 1, n, 0, n, 0);
      int seg3_ans = ret_seg.mn + 2;
      int last_ans = dp[i + 1] + 1;
      if (seg3_ans < last_ans) {
        dp[i] = seg3_ans;
        last[i] = ret_seg.pos;
        type[i] = 1;
      } else {
        dp[i] = last_ans;
        type[i] = 2;
      }
      t.update(i, i, dp[i], 0, n, 0);
    }
  }
  cout << dp[0] << '\n';
  int pos = 0;
  while (pos != n) {
    if (type[pos] == 0)
      pos++;
    else if (type[pos] == 1) {
      cout << "+2^" << n - pos << '\n';
      cout << "-2^" << n - last[pos] << '\n';
      for (int i = pos; i < last[pos]; i++)
        if (s[i] == '0') cout << "-2^" << n - i - 1 << '\n';
      pos = last[pos];
    } else {
      cout << "+2^" << n - pos - 1 << '\n';
      pos++;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  read();
  solve();
  return 0;
}