#include <bits/stdc++.h>

using namespace std;


#define endl "\n"
#define PII pair<int, int>
#define mp(x, y) make_pair(x, y)
#define reset(x) memset(x, 0, sizeof(x));
#define resets(x) memset(x, -1, sizeof(x));
#define resetss(x) memset(x, 0x3f3f3f3f, sizeof(x));
#define resetsss(x) memset(x, -0x3f3f3f3f, sizeof(x));
#define recopy(a, b) memcpy(b, a, sizeof(a));
typedef unsigned long long ULL;
typedef long long LL;
const int INF = 0x3f3f3f3f;
const int mod = 998244353;
const int maxn = 3e5 + 10;


LL fun1(LL n) { return (n / 2 * (n + 1)) % mod; }
LL fun2(LL n) { return ((n + 1) / 2 * n) %mod; }

int main() {
    ios::sync_with_stdio(false);


    LL A, B, C;
    cin >> A >> B >> C;
    if (A % 2 == 0) A = fun1(A);
    else A = fun2(A);
    if (B % 2 == 0) B = fun1(B);
    else B = fun2(B);
    if (C % 2 == 0) C = fun1(C);
    else C = fun2(C);
    LL ans = (((A * B) % mod) * C) % mod;
    cout << ans << endl;




    return 0;
}

/**
 ____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|

**/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

ll n;

int m;

int pwr (int a, ll b)
{
    if(b == 0)
        return 1;
    if(b & 1)
        return 1LL * a * pwr(a, (b ^ 1)) % m;
    int aux = pwr(a, (b >> 1));
    return 1LL * aux * aux % m;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n >> m;
    int m1 = m;
    m *= m;
    cout << pwr(10, n) / m1 << "\n";
    return 0;
}
