Game "Minesweeper 1D" is played on a line of squares, the line's height is 1 square, the line's width is n squares. Some of the squares contain bombs. If a square doesn't contain a bomb, then it contains a number from 0 to 2 — the total number of bombs in adjacent squares.

For example, the correct field to play looks like that: 001*2***101*. The cells that are marked with "*" contain bombs. Note that on the correct field the numbers represent the number of bombs in adjacent cells. For example, field 2* is not correct, because cell with value 2 must have two adjacent cells with bombs.

Valera wants to make a correct field to play "Minesweeper 1D". He has already painted a squared field with width of n cells, put several bombs on the field and wrote numbers into some cells. Now he wonders how many ways to fill the remaining cells with bombs and numbers are there if we should get a correct field in the end.

Input

The first line contains sequence of characters without spaces s1s2... sn (1 ≤ n ≤ 106), containing only characters "*", "?" and digits "0", "1" or "2". If character si equals "*", then the i-th cell of the field contains a bomb. If character si equals "?", then Valera hasn't yet decided what to put in the i-th cell. Character si, that is equal to a digit, represents the digit written in the i-th square.

Output

Print a single integer — the number of ways Valera can fill the empty cells and get a correct field.

As the answer can be rather large, print it modulo 1000000007 (109 + 7).

Examples

Input

?01???


Output

4


Input

?


Output

2


Input

**12


Output

0


Input

1


Output

0

Note

In the first test sample you can get the following correct fields: 001**1, 001***, 001*2*, 001*10.
import java.io.*;
import java.util.*;

public class R237_D2_B {
    static char[] inp;
    static int mod = 1000000007;
    static int dp[][];

    // 0 bomb 1 no bomb 2 left bomb
    public static int call(int index, int left) {
        if (index == inp.length && left != 0)
            return 1;
        if (index == inp.length)
            return 0;
        if (dp[index][left] != -1)
            return dp[index][left];
        int res;
        if (inp[index] == '?') {
            if (left == 0)
                res = call(index + 1, 2);
            else if (left == 1)
                res = (call(index + 1, 1) + call(index + 1, 0)) % mod;
            else
                res = ((call(index + 1, 1) + call(index + 1, 0)) % mod + call(
                        index + 1, 2)) % mod;
        } else {
            if (left == 0) {
                if (inp[index] != '*')
                    res = 0;
                else
                    res = call(index + 1, 2);
            } else if (left == 1) {
                if (inp[index] == '*' || inp[index] == '2')
                    res = 0;
                else if (inp[index] == '0')
                    res = call(index + 1, 1);
                else
                    res = call(index + 1, 0);
            } else {
                if (inp[index] == '0')
                    res = 0;
                else if (inp[index] == '1')
                    res = call(index + 1, 1);
                else if (inp[index] == '2')
                    res = call(index + 1, 0);
                else
                    res = call(index + 1, 2);
            }
        }
        return dp[index][left] = res % mod;
    }

    public static void main(String[] args) throws Exception {
        InputReader in = new InputReader(System.in);
        inp = in.readString().toCharArray();
        dp = new int[inp.length + 2][4];
        for (int i = 0; i < dp.length; i++) {
            Arrays.fill(dp[i], -1);
        }
        int ans;
        if (inp[0] == '*')
            ans = call(1, 2);
        else if (inp[0] == '1')
            ans = call(1, 0);
        else if (inp[0] == '0')
            ans = call(1, 1);
        else if (inp[0] == '2')
            ans = 0;
        else
            ans = ((call(1, 0) + call(1, 1)) % mod + call(1, 2)) % mod;
        System.out.println(ans);
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1000];
        private int curChar, numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private String readLine0() {
            StringBuffer buf = new StringBuffer();
            int c = read();
            while (c != '\n' && c != -1) {
                buf.appendCodePoint(c);
                c = read();
            }
            return buf.toString();
        }

        public String readLine() {
            String s = readLine0();
            while (s.trim().length() == 0)
                s = readLine0();
            return s;
        }

        public String readLine(boolean ignoreEmptyLines) {
            if (ignoreEmptyLines)
                return readLine();
            else
                return readLine0();
        }

        public char readCharacter() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            return (char) c;
        }

        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
    }
}
