#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long int dx[4] = {-1, 1, 0, 0};
long long int dy[4] = {0, 0, -1, 1};
const long long int mod = 1e9 + 7;
int32_t main() {
  long long int n, m;
  cin >> n >> m;
  long long int increaseBy[100005];
  increaseBy[2] = 2;
  increaseBy[3] = 2;
  for (long long int i = 4; i < 100005; i++)
    increaseBy[i] = (increaseBy[i - 1] + increaseBy[i - 2]) % mod;
  long long int answer = 2;
  for (long long int i = 2; i <= n; i++)
    answer = (answer + increaseBy[i]) % mod;
  for (long long int i = 2; i <= m; i++)
    answer = (answer + increaseBy[i]) % mod;
  cout << answer << '\t';
  return 0;
  cin >> n >> m;
  for (long long int n = 1; n < 7; n++) {
    for (long long int m = 1; m < 7; m++) {
      long long int togenerate = n * m;
      long long int answer = 0;
      for (long long int mask = 0; mask < (1 << togenerate); mask++) {
        long long int grid[n][m];
        long long int counter = 0;
        for (long long int i = 0; i < n; i++) {
          for (long long int j = 0; j < m; j++) {
            grid[i][j] = ((mask & (1 << counter++)) != 0);
          }
        }
        for (long long int i = 0; i < n; i++) {
          for (long long int j = 0; j < m; j++) {
            long long int count = 0;
            long long int col = grid[i][j];
            for (long long int k = 0; k < 4; k++) {
              long long int x = i + dx[k], y = j + dy[k];
              if (x < 0 || x >= n || y < 0 || y >= m) continue;
              if (grid[i][j] == grid[x][y]) count++;
            }
            if (count >= 2) goto nextMask;
          }
        }
        answer++;
      nextMask:;
      }
      cout << answer << '\t';
    }
    cout << '\n';
  }
  return 0;
}
