#include <bits/stdc++.h>
using namespace std;
long long f[100005], n, m;
int main() {
  cin >> n >> m;
  f[0] = 1;
  f[1] = 1;
  for (int i = 2; i <= 100000; i++)
    f[i] = (f[i - 1] + f[i - 2] + 1) % 1000000007;
  cout << (f[n] + f[m]) % 1000000007;
}
