#include <bits/stdc++.h>
using namespace std;
const long long maxn = 500005;
const long long inf = 0x3f3f3f3f3f3f3f3f;
const long long MOD = 1e9 + 7;
const double eps = 1e-10;
const double pi = 3.1415926535;
long long qpow(long long a, long long b) {
  long long tmp = a % MOD, ans = 1;
  while (b) {
    if (b & 1) {
      ans *= tmp, ans %= MOD;
    }
    tmp *= tmp, tmp %= MOD, b >>= 1;
  }
  return ans;
}
long long lowbit(long long x) { return x & -x; }
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
long long mmax(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
long long mmin(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
void mod(long long &a) {
  a += MOD;
  a %= MOD;
}
bool chk(long long now) {}
long long half(long long l, long long r) {
  while (l <= r) {
    long long m = (l + r) / 2;
    if (chk(m))
      r = m - 1;
    else
      l = m + 1;
  }
  return l;
}
long long ll(long long p) { return p << 1; }
long long rr(long long p) { return p << 1 | 1; }
long long mm(long long l, long long r) { return (l + r) / 2; }
long long lg(long long x) {
  if (x == 0) return 1;
  return (long long)log2(x) + 1;
}
bool smleql(double a, double b) {
  if (a < b || fabs(a - b) <= eps) return true;
  return false;
}
bool bigeql(double a, double b) {
  if (a > b || fabs(a - b) <= eps) return true;
  return false;
}
bool eql(double a, double b) {
  if (fabs(a - b) < eps) return 1;
  return 0;
}
double len(double a, double b, double c, double d) {
  return sqrt((a - c) * (a - c) + (b - d) * (b - d));
}
bool isp(long long x) {
  if (x == 1) return false;
  if (x == 2) return true;
  for (long long i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
inline long long read() {
  char ch = getchar();
  long long s = 0, w = 1;
  while (ch < 48 || ch > 57) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= 48 && ch <= 57) {
    s = (s << 1) + (s << 3) + ch - 48;
    ch = getchar();
  }
  return s * w;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (!(a & 1) && !(b & 1))
    return gcd(a >> 1, b >> 1) << 1;
  else if (!(b & 1))
    return gcd(a, b >> 1);
  else if (!(a & 1))
    return gcd(a >> 1, b);
  else
    return gcd(abs(a - b), min(a, b));
}
long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
long long n, m;
long long ans = 0;
long long head[maxn];
long long c[3];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n >> m;
  head[1] = 2;
  head[2] = 4;
  for (long long i = 3; i <= n; ++i) {
    head[i] = (head[i - 1] + head[i - 2]) % MOD;
  }
  c[1] = c[2] = 2;
  long long ans;
  if (m == 1)
    cout << (head[n]) % MOD;
  else if (m == 2)
    cout << (head[n] + 2) % MOD;
  else if (m == 3)
    cout << (head[n] + 4) % MOD;
  else {
    ans = (head[n] + 4) % MOD;
    for (long long i = 4; i <= m; ++i) {
      if (i & 1) {
        c[1] = (c[2] + c[1]) % MOD;
        ans = (ans + c[1]) % MOD;
      } else {
        c[2] = (c[2] + c[1]) % MOD;
        ans = (ans + c[2]) % MOD;
      }
    }
    cout << ans << endl;
  }
  return 0;
}

### Prompt

Please create a solution in Cpp to the following problem:

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>

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long long maxn = 500005;
const long long inf = 0x3f3f3f3f3f3f3f3f;
const long long MOD = 1e9 + 7;
const double eps = 1e-10;
const double pi = 3.1415926535;
long long qpow(long long a, long long b) {
  long long tmp = a % MOD, ans = 1;
  while (b) {
    if (b & 1) {
      ans *= tmp, ans %= MOD;
    }
    tmp *= tmp, tmp %= MOD, b >>= 1;
  }
  return ans;
}
long long lowbit(long long x) { return x & -x; }
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
long long mmax(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
long long mmin(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
void mod(long long &a) {
  a += MOD;
  a %= MOD;
}
bool chk(long long now) {}
long long half(long long l, long long r) {
  while (l <= r) {
    long long m = (l + r) / 2;
    if (chk(m))
      r = m - 1;
    else
      l = m + 1;
  }
  return l;
}
long long ll(long long p) { return p << 1; }
long long rr(long long p) { return p << 1 | 1; }
long long mm(long long l, long long r) { return (l + r) / 2; }
long long lg(long long x) {
  if (x == 0) return 1;
  return (long long)log2(x) + 1;
}
bool smleql(double a, double b) {
  if (a < b || fabs(a - b) <= eps) return true;
  return false;
}
bool bigeql(double a, double b) {
  if (a > b || fabs(a - b) <= eps) return true;
  return false;
}
bool eql(double a, double b) {
  if (fabs(a - b) < eps) return 1;
  return 0;
}
double len(double a, double b, double c, double d) {
  return sqrt((a - c) * (a - c) + (b - d) * (b - d));
}
bool isp(long long x) {
  if (x == 1) return false;
  if (x == 2) return true;
  for (long long i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
inline long long read() {
  char ch = getchar();
  long long s = 0, w = 1;
  while (ch < 48 || ch > 57) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= 48 && ch <= 57) {
    s = (s << 1) + (s << 3) + ch - 48;
    ch = getchar();
  }
  return s * w;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (!(a & 1) && !(b & 1))
    return gcd(a >> 1, b >> 1) << 1;
  else if (!(b & 1))
    return gcd(a, b >> 1);
  else if (!(a & 1))
    return gcd(a >> 1, b);
  else
    return gcd(abs(a - b), min(a, b));
}
long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
long long n, m;
long long ans = 0;
long long head[maxn];
long long c[3];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n >> m;
  head[1] = 2;
  head[2] = 4;
  for (long long i = 3; i <= n; ++i) {
    head[i] = (head[i - 1] + head[i - 2]) % MOD;
  }
  c[1] = c[2] = 2;
  long long ans;
  if (m == 1)
    cout << (head[n]) % MOD;
  else if (m == 2)
    cout << (head[n] + 2) % MOD;
  else if (m == 3)
    cout << (head[n] + 4) % MOD;
  else {
    ans = (head[n] + 4) % MOD;
    for (long long i = 4; i <= m; ++i) {
      if (i & 1) {
        c[1] = (c[2] + c[1]) % MOD;
        ans = (ans + c[1]) % MOD;
      } else {
        c[2] = (c[2] + c[1]) % MOD;
        ans = (ans + c[2]) % MOD;
      }
    }
    cout << ans << endl;
  }
  return 0;
}

```