#include <bits/stdc++.h>
using namespace std;
const long long int M = 1e9 + 7;
const long long int maxn = 1e5 + 7;
int a[maxn];
void fib() {
  a[0] = a[1] = 1;
  for (int i = 1; i <= maxn; i++) {
    if (i == 1)
      continue;
    else
      a[i] = (a[i - 1] + a[i - 2]) % M;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  fib();
  cout << (a[n] * 2 % M + (a[m] - 1) * 2 % M) % M << "\n";
  return 0;
}
