#include<bits/stdc++.h>
#define f1(i, n) for(int i=1;i<=n;++i)
#define f0(i, n) for(int i=0;i<n;++i)
#define ull unsigned long long
#define ll long long
#define rev(a) reverse(a.begin(),a.end())
#define all(x) x.begin(),x.end()
#define so(A, n) sort(A+1, A+n+1)
using namespace std;
const int maxn = 1e6 + 1;
const int N = 5e5 + 1;
const ll mod = 1e8;
int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	ll n;
	cin >> n;
	ll res;
	if (n % 2 == 0) {
		res = (((n / 2) % mod) * ((n + 1) % mod)) % mod;
	}
	else {
		res = ((((n + 1) / 2) % mod) * (n % mod)) % mod;
	}
	cout<<(res * res) % mod;

}

