#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long LL;
const LL mod=2148473647;
int n;
LL p,q;
LL qmi(LL a, LL k, LL p)
{
LL res = 1 % p;
while (k)
{
if (k & 1) res = (LL)res * a % p;
a = (LL)a * a % p;
k >>= 1;
}
return res;
}
int main()
{
scanf("%d", &n);
p=n*(n+1)%mod;
q=2*(2*n-1)%mod;
cout<<p*qmi(q,mod-2,mod)%mod;
}