#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#include <list>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
//#define cerr if(false) cerr
#ifdef DEBUG
#define show(...) cerr << #__VA_ARGS__ << " = ", debug(__VA_ARGS__);
#else
#define show(...) 42
#endif
using namespace std;
using ll = long long;
using pii = pair<int, int>;
template <typename T, typename S>
ostream& operator<<(ostream& os, pair<T, S> a) {
    os << '(' << a.first << ',' << a.second << ')';
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
    for (auto x : v) os << x << ' ';
    return os;
}
void debug() {
    cerr << '\n';
}
template <typename H, typename... T>
void debug(H a, T... b) {
    cerr << a;
    if (sizeof...(b)) cerr << ", ";
    debug(b...);
}


complex<double> operator*(const complex<double> a, const complex<double> b)
{
    return complex<double>(a.real()*b.real()-a.imag()*b.imag(),a.real()*b.imag()+a.imag()*b.real());
}

void fft(vector<complex<double> >& a,bool rev = false)
{
    const double PI = 3.14159265358979324;
    unsigned int i, j, k, l;
    double r;
    complex<double> p, q, s;
    const unsigned int size = a.size();
    if(size == 1) return;
    vector<complex<double> > b(size);
    r = rev ? (- 2 * PI / size) : 2 * PI / size;
    vector<complex<double> > kp(size / 2 + 1, 1);
    for(i = 0; i < size / 2; ++i) kp[i] = polar((double)1.0, i * r);
    for(i = 1, l = size / 2; i < size; i <<= 1, l >>= 1){
        for(j = 0, r = 0; j < l; ++j, r += i){
            for(k = 0, s = kp[i * j]; k < i; ++k){
                p = a[k + r], q = a[k + r + size / 2];
                b[k + 2 * r] = p + q;
                b[k + 2 * r + i] = (p - q) * s;
            }
        }
        swap(a, b);
    }
    if(rev){
        for(i = 0; i < size; i++){ a[i] /= size; }
    }
}
 
vector<ll> mul(const vector<int>& a, const vector<int>& b)
{
    int s = (int)a.size() + (int)b.size() - 1, t = 1;
    while(t < s) t *= 2;
    vector<complex<double> > A(t), B(t);
    for(int i = 0; i < (int)a.size(); i++) A[i].real(a[i]);
    for(int i = 0; i < (int)b.size(); i++) B[i].real(b[i]);
    fft(A), fft(B);
    for(int i = 0; i < t; i++) A[i] *= B[i];
    fft(A, true);
    vector<ll> res(s);
    for(int i = 0; i < s; i++) res[i] = round(A[i].real());
    return res;
}
//負の数を掛けたりするとバグる
template<int MOD>
class Modint{
public:
    int a;
    Modint(const long long v = 0):a(v % MOD){}
    static constexpr int getmod(){
        return MOD;
    }
    Modint operator+(const Modint rhs) const{
        return Modint(*this) += rhs;
    }
    Modint operator-(const Modint rhs) const{
        return Modint(*this) -= rhs;
    }
    Modint operator*(const Modint rhs) const{
        return Modint(*this) *= rhs;
    }
    Modint operator/(const Modint rhs) const{
        return Modint(*this) /= rhs;
    }
    Modint operator+(const long long rhs) const{
        return Modint(*this) += rhs;
    }
    Modint operator-(const long long rhs) const{
        return Modint(*this) -= rhs;
    }
    Modint operator*(const long long rhs) const{
        return Modint(*this) *= rhs;
    }
    Modint operator/(const long long rhs) const{
        return Modint(*this) /= rhs;
    }
    friend Modint operator+(const long long a, const Modint b){
        return b + a;
    }
    friend Modint operator-(const long long a, const Modint b){
        return -b + a;
    }
    friend Modint operator*(const long long a, const Modint b){
        return b * a;
    }
    friend Modint operator/(const long long a, const Modint b){
        return Modint(a) / b;
    }
    Modint &operator+=(const Modint rhs){
        a += rhs.a;
        if(a >= MOD){
            a -= MOD;
        }
        return *this;
    }
    Modint &operator-=(const Modint rhs){
        if(a < rhs.a){
            a += MOD;
        }
        a -= rhs.a;
        return *this;
    }
    Modint &operator*=(const Modint rhs){
        a = (long long)a * rhs.a % MOD;
        return *this;
    }
    Modint &operator/=(Modint rhs){
        int x = MOD - 2;
        while(x){
            if(x % 2){
                *this *= rhs;
            }
            rhs *= rhs;
            x /= 2;
        }
        return *this;
    }
    Modint &operator++(){
        *this += 1;
        return *this;
    }
    Modint &operator--(){
        *this -= 1;
        return *this;
    }
    Modint operator++(int){
        Modint res = *this;
        ++(*this);
        return res;
    }
    Modint operator--(int){
        Modint res = *this;
        --(*this);
        return res;
    }
    Modint &operator+=(const long long rhs){
        *this += Modint(rhs);
        return *this;
    }
    Modint &operator-=(const long long rhs){
        *this -= Modint(rhs);
        return *this;
    }
    Modint &operator*=(const long long rhs){
        *this *= Modint(rhs);
        return *this;
    }
    Modint &operator/=(const long long rhs){
        *this /= Modint(rhs);
        return *this;
    }
    Modint operator+() const{
        return *this;
    }
    Modint operator-() const{
        return Modint()-*this;
    }
    bool operator==(const Modint rhs) const{
        return a == rhs.a;
    }
    bool operator==(const long long rhs) const{
        return a == rhs;
    }
    friend bool operator==(const long long a, const Modint b){
        return a == b.a;
    }
    bool operator!=(const Modint rhs) const{
        return a != rhs.a;
    }
    bool operator!=(const long long rhs) const{
        return a != rhs;
    }
    friend ostream &operator<<(ostream &os, const Modint x){
        os << x.a;
        return os;
    }
    friend istream &operator>>(istream &is, Modint &x){
        is >> x.a;
        return is;
    }
    explicit operator bool() const{
        return a > 0;
    }
    bool operator!(){
        return a == 0;
    }
    explicit operator int() const{
        return a;
    }
    explicit operator long long() const{
        return (long long) a;
    }
    friend Modint pow(Modint a, long long b){
        Modint res = 1;
        while(b){
            if(b % 2){
                res *= a;
            }
            a *= a;
            b /= 2;
        }
        return res;
    }
};
const int P = 200003;
using mint = Modint<200003>;
int pre[P];
int main(){
    rep(i,P-1){
        pre[pow(mint(2), i).a] = i;
    }
    int n;
    cin >> n;
    vector<mint>a(n);
    vector<int>b(P);
    rep(i,n){
        cin >> a[i];
        if(a[i] == 0)continue;
        b[pre[a[i].a]]++;
    }
    auto c = mul(b, b);
    
    ll ans = 0;
    for(int i = 0; i < c.size(); i++){
        ans += (ll)pow(mint(2), i).a * c[i];
    }
    for(int i = 0; i < a.size(); i++){
        ans -= pow(a[i], 2).a;
    }
    cout << ans / 2 << endl;
}


Measured memory_bytes: 34776