#include <bits/stdc++.h>
using namespace std;
int gcdExtended(int a, int b, int *x, int *y);
long long int fib[100002];
void fibonacci(void) {
  fib[0] = 0;
  fib[1] = 1;
  for (long long int i = 2; i < 100002; i++) {
    fib[i] =
        ((fib[i - 1]) % 1000000007 + (fib[i - 2]) % 1000000007) % 1000000007;
  }
}
int modInverse(int b, int m) {
  int x, y;
  int g = gcdExtended(b, m, &x, &y);
  if (g != 1) return -1;
  return (x % m + m) % m;
}
int gcdExtended(int a, int b, int *x, int *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  int x1, y1;
  int gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
long long int moduloMultiplication(long long int a, long long int b,
                                   long long int mod) {
  long long int res = 0;
  a %= mod;
  while (b) {
    if (b & 1) res = (res + a) % mod;
    a = (2 * a) % mod;
    b >>= 1;
  }
  return res % mod;
}
long long int pow2(long long int base, long long int exp) {
  long long int res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % 1000000007;
    base = (base * base) % 1000000007;
    exp /= 2;
  }
  return res % 1000000007;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  fibonacci();
  long long int n, m;
  cin >> n >> m;
  long long int res = ((fib[n + 1] + fib[m + 1] - 1) * 2) % 1000000007;
  cout << res;
  return 0;
}
