#include <bits/stdc++.h>

template <typename T>
T next() {
    T temp; std::cin >> temp;
    return temp;
}

template <>
int next() {
    int temp; scanf("%d", &temp);
    return temp;
}
template <>
long long next() {
    long long temp; scanf("%lld", &temp);
    return temp;
}
template <>
double next() {
    double temp; scanf("%lf", &temp);
    return temp;
}
template <>
float next() {
    float temp; scanf("%f", &temp);
    return temp;
}

template <typename T1, typename T2>
std::pair<T1, T2> next() {
    std::pair<T1, T2> temp;
    temp.first = next<T1>();
    temp.second = next<T2>();
    return temp;
}

template <typename T>
std::vector<T> next(int n) {
    std::vector<T> temp(n);
    for(int i = 0; i < n; i++)
        temp[i] = next<T>();
    return temp;
}

template <typename T1, typename T2>
std::vector<std::pair<T1, T2>> next(int n) {
    std::vector<std::pair<T1, T2>> temp(n);
    for(int i = 0; i < n; i++)
        temp[i] = next<T1, T2>();
    return temp;
}

template <typename T>
void print(const T &x, char endc = '\n') {
    std::cout << x << endc;
    return;
}
void print(const int &x, char endc = '\n') {
    printf("%d%c", x, endc);
    return;
}
void print(const long long &x, char endc = '\n') {
    printf("%lld%c", x, endc);
    return;
}
void print(const size_t &x, char endc = '\n') {
    printf("%zu%c", x, endc);
    return;
}
void print(const float &x, char endc = '\n') {
    printf("%f%c", x, endc);
    return;
}
void print(const double &x, char endc = '\n') {
    printf("%lf%c", x, endc);
    return;
}

template<typename T1, typename T2>
void print(const std::pair<T1, T2> &p, char sepc = ' ', char endc = '\n') {
    print(p.first, sepc);
    print(p.second, endc);
    return;
}

template<typename T>
void print(const std::vector<T> &v, char sepc = ' ', char endc = '\n') {
    for(const T &e : v) print(e, sepc);
    printf("%c", endc);
    return;
}


template<typename T>
class CountMap {
private:
    std::map<T, int> _cntmap;
    int _totalcnt = 0;

public:
    CountMap() {}

    CountMap(const std::vector<T> &v) {
        for(const T &x : v)
            _cntmap[x]++;
        _totalcnt = v.size();
    }

    void add(const T &x) {
        _cntmap[x]++;
        _totalcnt++;
    }

    void remove(const T &x) {
        if(--_cntmap[x] == 0) {
            _cntmap.erase(x);
        }
        _totalcnt--;
    }

    int count() const {
        return _totalcnt;
    }

    T minElement() const {
        return _cntmap.begin()->first;
    }

    T maxElement() const {
        return _cntmap.rbegin()->first;
    }

    bool empty() const {
        return _cntmap.empty();
    }

    std::vector<T> getElements() const {
        std::vector<T> ret;
        for(auto it = _cntmap.begin(); it != _cntmap.end(); it++)
            ret.push_back(it->first);
        
        return ret;
    }

    int operator[] (const T &x) const {
        auto it = _cntmap.find(x);
        if(it == _cntmap.end()) return 0;
        return it->second;
    }
};



using namespace std;

const int mod = 998244353;



void eachTC() {
    int N = next<int>();
    vector<long long> A = next<long long>(N);

    if(N == 1) {
        print(A[0] * A[0] % mod);
        return;
    }
    
    sort(A.begin(), A.end());

    vector<long long> multiplier(N);
    multiplier[N-1] = A[N-1];

    for(int i = N-2; i >= 0; i--)
        multiplier[i] = (2 * multiplier[i+1] - A[i+1] + A[i] + mod) % mod;
    
    long long res = 0;
    for(int i = 0; i < N; i++)
        res = (res + (A[i] * multiplier[i]) % mod) % mod;
    
    print(res);
}

int main() {
    constexpr bool multipleTC = false;
    int T = multipleTC ? next<int>() : 1;
    while(T--) eachTC();

    return 0;
}

// #pragma GCC optimize ("O3")
#include <bits/stdc++.h>
using namespace std;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template <class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template <class key, class value, class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

// Defines

#define pb push_back
#define ff first
#define ss second
#define quick                    \
    ios::sync_with_stdio(false); \
    cin.tie(0);
#define time cerr << (0.1 * clock()) / CLOCKS_PER_SEC << endl;
#define int long long
typedef pair<int, int> pl;
#define forn(n) for (int i = 0; i < n; i++)
#define endl "\n"
#define all(v) (v).begin(), (v).end()
#define ppc __builtin_popcount
#define ppcll __builtin_popcountll
int power(int a, int n, int md) {
    if (n == 0) {
        return 1;
    } else {
        int res = power(a, n / 2, md);
        res = (res * res) % md;
        if (n % 2 != 0) {
            res = (res * a) % md;
        }
        return res;
    }
}
random_device rndm;
mt19937 grndm(rndm());
void mix(int* a, int* b) { shuffle(a, b, grndm); }

// Constants

const int mod = 1000000007;

// Code begins

void solve() {
    double a, b;
    cin >> a >> b;
    double ans = a*b/100;
    cout << ans << '\n';
}

signed main() {
    quick;
    solve();
    // int t;
    // cin >> t;
    // while (t--) {
    //     solve();
    // }
}