#include <bits/stdc++.h>
using namespace std;
ifstream f("s.in");
ofstream g("s.out");
long long N, M, i;
long long Nr[100002];
int main() {
  Nr[1] = 2;
  Nr[2] = 4;
  for (i = 3; i < 100002; i++) Nr[i] = (Nr[i - 1] + Nr[i - 2]) % 1000000007;
  cin >> M >> N;
  cout << (Nr[M] + Nr[N] - 2) % 1000000007;
  return 0;
}
