#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int N = 100005;
const int inf = INT_MAX;
const int M = 1e9 + 7;
int main() {
  vector<int> v;
  v.push_back(0);
  v.push_back(1);
  v.push_back(2);
  int a = 1, b = 2;
  for (int i = 3; i < 100005; i++) {
    int c = (a + b) % M;
    v.push_back(c);
    a = b % M;
    b = c % M;
  }
  scanf("%d", &a);
  scanf("%d", &b);
  int ans = (v[a] + v[b] - 1) % M;
  ans = (ans + ans) % M;
  printf("%d ", ans);
}
