Recently Ivan the Fool decided to become smarter and study the probability theory. He thinks that he understands the subject fairly well, and so he began to behave like he already got PhD in that area.

To prove his skills, Ivan decided to demonstrate his friends a concept of random picture. A picture is a field of n rows and m columns, where each cell is either black or white. Ivan calls the picture random if for every cell it has at most one adjacent cell of the same color. Two cells are considered adjacent if they share a side.

Ivan's brothers spent some time trying to explain that it's not how the randomness usually works. Trying to convince Ivan, they want to count the number of different random (according to Ivan) pictures. Two pictures are considered different if at least one cell on those two picture is colored differently. Since the number of such pictures may be quite large, print it modulo 10^9 + 7.

Input

The only line contains two integers n and m (1 ≤ n, m ≤ 100 000), the number of rows and the number of columns of the field.

Output

Print one integer, the number of random pictures modulo 10^9 + 7.

Example

Input


2 3


Output


8

Note

The picture below shows all possible random pictures of size 2 by 3. 

<image>
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

public class Task1248C {

    public static class FastScanner {

        protected static final int STRBUFFERLENGTH = 0x1000;

        protected DataInputStream dataInputStream;
        protected byte[] buffer = new byte[0x10000];
        protected byte[] strbuffer = new byte[STRBUFFERLENGTH];
        protected int bufferOffset;
        protected int bufferLength;
        protected boolean isEndOfFile;

        public FastScanner() throws IOException {
            dataInputStream = new DataInputStream(System.in);
            Read();
        }

        public FastScanner(final String fileName) throws IOException {
            dataInputStream = new DataInputStream(new FileInputStream(fileName));
            Read();
        }

        protected void Read() throws IOException {
            final int length = dataInputStream.read(buffer);
            if (length > 0) {
                bufferLength = length;
            } else {
                bufferLength = 0;
                isEndOfFile = true;
            }
            bufferOffset = 0;
        }

        protected byte nextByte() throws IOException {
            if (bufferOffset == bufferLength) {
                if (!isEndOfFile) Read();
                if (isEndOfFile) return 0;
            }
            return buffer[bufferOffset++];
        }

        public int nextInt() throws IOException {
            int a = 0;
            boolean isNegative = false;

            byte b = nextByte();
            while (b <= ' ') b = nextByte();
            if (b == '-') {
                isNegative = true;
                b = nextByte();
            }
            while (b > ' ') {
                a = a * 10 + (b - '0');
                b = nextByte();
            }
            return isNegative ? -a : a;
        }

    }

    public static final long MODULUS = 1000000007L;

    public static class Variants {
        public int key;
        public long num;
        public long[][] n = new long[4][4];
    }

    public static HashMap<Integer, Variants> variants = new HashMap<Integer, Variants>();
    public static final Integer[] POW2 = {65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1};
    public static List<Integer> pow2 = Arrays.asList(POW2);

    public static final int B = 0;
    public static final int W = 1;
    public static final int BB = 2;
    public static final int WW = 3;

    static {
        final Variants v = new Variants();
        v.key = 1;
        v.num = 2;
        v.n[B][B] = v.n[W][W] = 1;
        variants.put(1, v);
    }

    public static Variants GetMultiVariants(final Variants v1, final Variants v2) {
        final Variants v = new Variants();
        for (int i1 = 0; i1 < 4; i1++) {
            for (int i2 = 0; i2 < 4; i2++) {
                if (i1 == W && i2 == W) {
                    // стыковка разрешена, но при стыковке справа с единицей получаем WW в конце
                    if (v1.key == 1 && v2.key == 1) {
                        v.n[WW][WW]++;
                    } else if (v2.key == 1) {
                        for (int i = 0; i < 4; i++) v.n[i][WW] += v1.n[i][W];
                    } else {
                        for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) v.n[i][j] += v1.n[i][i1] * v2.n[i2][j];
                    }
                } else if (i1 == B && i2 == B) {
                    // стыковка разрешена, но при стыковке справа с единицей получаем BB в конце
                    if (v1.key == 1 && v2.key == 1) {
                        v.n[BB][BB]++;
                    } else if (v2.key == 1) {
                        for (int i = 0; i < 4; i++) v.n[i][BB] += v1.n[i][B];
                    } else {
                        for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) v.n[i][j] += v1.n[i][i1] * v2.n[i2][j];
                    }
                } else if ((i1 == WW && i2 == W) || (i1 == W && i2 == WW) || (i1 == WW && i2 == WW)
                        || (i1 == B && i2 == BB) || (i1 == BB && i2 == B) || (i1 == BB && i2 == BB)) {
                    // не состыкуются - ничего не деляем
                } else {
                    // состыкуются - обычное суммирование вариантов
                    for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) v.n[i][j] += v1.n[i][i1] * v2.n[i2][j];
                }
            }
        }
        for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) v.n[i][j] %= MODULUS;
        for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) v.num += v.n[i][j];
        v.num %= MODULUS;
        return v;
    }

    public static Variants GetVariants(final int n) {
        if (variants.containsKey(n)) return variants.get(n);
        if (pow2.contains(n)) {
            final Variants v = GetVariants(n/2);
            final Variants v2 = GetMultiVariants(v, v);
            v2.key = n;
            variants.put(n, v2);
            return v2;
        } else {
            Variants v = new Variants();
            boolean firstPower = true;
            for (final int pow : pow2) {
                if ((n & pow) > 0) {
                    if (firstPower) {
                        v = GetVariants(pow);
                        firstPower = false;
                    } else {
                        v = GetMultiVariants(v, GetVariants(pow));
                    }
                }
            }
            return v;
        }
    }

    public static long GetNumVariants(final int N) {
        return GetVariants(N).num;
    }

    public static void main(final String[] args) throws IOException {
        final FastScanner scanner = new FastScanner();

        final int n = scanner.nextInt();
        final int m = scanner.nextInt();

        long numVariants = GetNumVariants(m);
        numVariants += MODULUS - 2;
        numVariants %= MODULUS;

        numVariants += GetNumVariants(n);
        numVariants %= MODULUS;

        System.out.println(numVariants);
    }

}
