#include <bits/stdc++.h>
using namespace std;
int n, m;
int f[100005];
void fib() {
  f[1] = 1;
  f[2] = 2;
  int a = 2, b = 4, c;
  for (int i = 3; i < 100005; ++i) f[i] = (f[i - 1] + f[i - 2]) % 1000000007;
}
int main() {
  scanf("%d%d", &n, &m);
  fib();
  printf("%d\n",
         ((2 % 1000000007) * ((f[n] + f[m] - 1 + 1000000007) % 1000000007)) %
             1000000007);
}
