/** ------------------------------------------------------------------------ **/
#include <bits/stdc++.h>
#include <ext/rope>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/hash_policy.hpp>
using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;

template<typename T> using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename T1, typename T2> using ordered_map =
tree<T1, T2, less<T1>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename T> using hash_set = gp_hash_table<T, null_type>;
template<typename T1, typename T2> using hash_map = gp_hash_table<T1, T2>;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng64(chrono::steady_clock::now().time_since_epoch().count());

template<typename T1, typename T2>
ostream& operator<< (ostream& os, const pair<T1, T2>& p) {
	return os << "<" << p.first << "," << p.second << ">";
}
#define container_ostream(container)                            \
template<typename... T>                                         \
ostream& operator<< (ostream& os, const container<T...>& c) {   \
	if (c.empty()) return os << "{ }";                          \
	auto ite = c.begin();                                       \
	os << "{ " << *ite;                                         \
	while (++ite != c.end()) os << ", " << *ite;                \
	return os << " }";                                          \
}
container_ostream(vector)
container_ostream(deque)
container_ostream(list)
container_ostream(set)
container_ostream(map)
container_ostream(multiset)
container_ostream(multimap)

void dbg() { cerr << endl; }
template<typename Head, typename... Tail> void dbg(Head h, Tail... t) {
	cerr << " " << h;
	dbg(t...);
}
#ifdef LOCAL
#define debug(...) cerr << "[ "#__VA_ARGS__" ] :", dbg(__VA_ARGS__)
#else
#define debug(...) 0
#endif

constexpr const int mod = 1000000007;
constexpr int add(int a, int b) { return a + b < mod ? a + b : a + b - mod; }
constexpr int sub(int a, int b) { return a < b ? a + b - mod : a - b; }
constexpr int mul(int a, int b) { return 1LL * a * b % mod; }

constexpr const int maxn = 1 << 17;
int fib[maxn];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	fib[0] = fib[1] = 1;
	for (int i = 2; i != maxn; ++i) fib[i] = add(fib[i - 1], fib[i - 2]);
	int n, m;
	cin >> n >> m;
	cout << mul(sub(add(fib[n], fib[m]), 1), 2) << endl;
}
