#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m;
  cin >> n >> m;
  long long int f[100100], mod = 1000000007;
  f[0] = f[1] = 1;
  for (long long int i = 2; i <= 100100; i++)
    f[i] = (f[i - 1] + f[i - 2]) % mod;
  long long int cnt = 2 * (f[n] + f[m] - 1 + mod) % mod;
  cout << cnt << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
