#include <bits/stdc++.h>
using namespace std;
long long int f[100005];
void solve() {
  f[1] = 1;
  f[2] = 2;
  for (long long int i = 3; i < 100005; i++)
    f[i] = (f[i - 1] + f[i - 2]) % 1000000007;
  long long int n, m;
  cin >> n >> m;
  long long int ans = (f[n] + f[m] - 1) % 1000000007;
  ans = (2 * ans) % 1000000007;
  ans = (ans + 1000000007) % 1000000007;
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cout.precision(20);
  long long int t = 1;
  for (long long int i = 1; i <= t; i++) {
    if (0) cout << "Case #" << i << ": ";
    solve();
  }
}
