mod = 998244353 N = int(input()) print(((N+2)*(N+3)*pow(6,-1,mod))%mod)