#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const double Pi = acos(-1.0);
const double epsilon = Pi / 180.0;
const int maxn = 2e5 + 10;
int a[maxn];
int main() {
  long long n, m;
  scanf("%lld %lld", &(n), &(m));
  a[1] = 2, a[2] = 4;
  for (int i = 3; i <= max(n, m); i++) a[i] = (a[i - 1] + a[i - 2]) % mod;
  long long ans = (a[n] + a[m] - 2) % mod;
  printf("%lld\n", ans);
}
