#include <bits/stdc++.h>
#include <ext/numeric>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#define oo 0x3f3f3f3f
#define OO 0x3f3f3f3f3f3f3f3f
#define popcount(n) __builtin_popcount(n)
#define popcountll(n) __builtin_popcountll(n)
#define long long long

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>;
typedef pair<int, int> ii;
typedef pair<pair<long, int>, int> iii;
typedef pair<int, long> ill;
typedef pair<long, int> lli;
typedef vector<int> vi;
typedef vector<long> vl;
typedef vector<pair<long, long>> vll;
typedef vector<ii> vii;
typedef vector<pair<ii, int>> viii;

const double PI = acos(-1.0), EPS = 1e-9;
const int MAXN = 100005, MAXM = 102, Mod = 998244353, MAXLog = 20;


int n, m;
int memo[MAXN][2][2];
int solve(int idx, bool val, bool prev) {
    if (idx == n)
        return 1;
    int &ret = memo[idx][val][prev];
    if (~ret)
        return ret;
    ret = solve(idx + 1, !val, val);
    if (prev != val)
        ret = (ret + solve(idx + 1, val, val)) % Mod;
    return ret;
}

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "rt", stdin);
//    freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0), cout.precision(10), cout << fixed;

    cin >> n >> m;
    memset(memo, -1, sizeof memo);
    int ans = solve(0, 0, 1);
    n = m;
    memset(memo, -1, sizeof memo);
    ans += solve(0, 0, 1);
    ans %= Mod;
    cout << ans % Mod << '\n';


    return 0;
}