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 JAVA):

Solution:
import java.lang.*;
import java.math.BigInteger;
import java.io.*;
import java.util.*;

public class Solution implements Runnable{
    public static BufferedReader br;
    public static PrintWriter out;
    public static StringTokenizer stk;
    public static boolean isStream = true;

    public static void main(String[] args) throws IOException {
    	if (isStream) {
            br = new BufferedReader(new InputStreamReader(System.in));
        } else {
            br = new BufferedReader(new FileReader("in.txt"));
        }
        out = new PrintWriter(System.out);
        new Thread(new Solution()).start();
    }

    public void loadLine() {
        try {
            stk = new StringTokenizer(br.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
            return "";
        }
    }

    public String nextWord() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return stk.nextToken();
    }

    public Integer nextInt() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Integer.valueOf(stk.nextToken());
    }

    public Long nextLong() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Long.valueOf(stk.nextToken());
    }

    public Double nextDouble() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Double.valueOf(stk.nextToken());
    }
    
    public Float nextFloat() {
        while (stk==null||!stk.hasMoreTokens()) loadLine();
        return Float.valueOf(stk.nextToken());
    }

	int[][] dp, ba;
	int n;
	
	char[][] getSS(char[] s) {
		char[][] ans = new char[2][n];
		ans[0] = s.clone();
		ans[1] = s.clone();
		for (int i = 0; i < n; ++i) {
			if (ans[1][i] == '0') ans[1][i] = '1';
			else ans[1][i] = '0';
		}
		for (int i = 0; i < n; ++i) {
			if (ans[1][i] == '1') ans[1][i] = '0';
			else { 
				ans[1][i] = '1';
				break;
			}
		}
		return ans;
	}
	
    public void run() {
    	char[] s = new StringBuilder("00"+nextWord()).reverse().toString().toCharArray();
    	n = s.length;
    	char[][] ss = getSS(s);

    	dp = new int[2][n+1];
    	ba = new int[2][n+1];
    	Arrays.fill(dp[0], -1);
    	Arrays.fill(dp[1], -1);
    	Arrays.fill(ba[0], -1);
    	Arrays.fill(ba[1], -1);
    	if (ss[0][0] == '0') {
    		dp[0][0] = ba[0][0] = 0;
    	} else {
    		dp[0][0] = ba[0][0] = 1;
    	}
    	if (ss[1][0] == '0') {
    		dp[1][0] = ba[1][0] = 0;
    	} else {
    		dp[1][0] = ba[1][0] = 1;
    	}
    	
    	for (int i = 1; i < n; ++i) {
    		for (int d = 0; d <= 1; ++d) {
        		if (ss[d][i] == '1') {
            		ba[d][i] = 1;
            		dp[d][i] = dp[d][i-1]+1;
        		} else {
            		ba[d][i] = 0;
            		dp[d][i] = dp[d][i-1];
            		if (dp[1-d][i-1] + 1 < dp[d][i]) {
            			dp[d][i] = dp[1-d][i-1] + 1;
                		ba[d][i] = 1;
            		}
        		}
        	}
    	}
    	
    	ArrayList<String> ans = new ArrayList<String>();
    	int curD = dp[0][n-1] <= dp[1][n-1] ? 0 : 1;
    	int cnt = Math.min(dp[0][n-1], dp[1][n-1]);
    	for (int i = n-1; i >= 0; --i) {
    		if (ba[curD][i] == 1) {
    			String as = "";
	    		if (curD == 0) as += "+";
	    		else as += "-";
	    		as += "2^";
	    		as += Integer.toString(i);
	    		ans.add(as);
	    		if (ss[curD][i] == '0') {
	    			curD = 1-curD;
	    		}
    		}
    	}

    	out.println(cnt);
    	for (String as : ans) {
    		out.println(as);
    	}
    	out.flush();
    }
}