#include <bits/stdc++.h>
using namespace std;
long long fib[100001];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  fib[0] = 0;
  fib[1] = 1;
  fib[2] = 1;
  for (long long i = 3; i <= 100000; i++)
    fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000007;
  cin >> n >> m;
  long long ch[n + 1], co[n + 1];
  long long r, c;
  long long ans = (((fib[n] + fib[n - 1]) % 1000000007) *
                   ((fib[m] + fib[m - 1]) % 1000000007) * 2) %
                  1000000007;
  cout << ans << endl;
}
