#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
ll modpow(ll a, ll n, ll m) {
  if (n == 0) return 1;
  ll half = modpow(a, n / 2, m);
  ll res = half * half % m;
  if (n & 1) res = res * a % m;
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<int> p(n);
  for (int i = (int)(0); i < (int)(n); i++) {
    cin >> p[i];
  }
  vector<ll> pro(n + 1);
  pro[n] = 1;
  for (int i = n - 1; i >= 0; i--) {
    pro[i] = pro[i + 1] * p[i] % 998244353;
  }
  ll ans = 0;
  for (int i = (int)(0); i < (int)(n); i++) {
    ans += modpow(10, 2 * (n - i), 998244353) * modinv(pro[i], 998244353) %
           998244353;
    ans %= 998244353;
  }
  cout << ans << endl;
}
