#P6597. Counting Structural Isomers of Alkenes

    ID: 19808 Type: Default 1000ms 256MiB

Counting Structural Isomers of Alkenes

Counting Structural Isomers of Alkenes

Given an integer ( n ) representing the number of carbon atoms, count the number of distinct constitutional (structural) isomers of alkenes with molecular formula (C_nH_{2n}) (ethylene homologues). In this problem, stereoisomerism, including spatial and cis–trans isomerism, is not considered. Report your answer modulo (998244353).

Note: Since an alkene must contain a double bond, the minimum valid value for ( n ) is 2.

inputFormat

The input consists of a single integer ( n ) (with ( 2 \le n \le 10 )) representing the number of carbon atoms in the alkene.

outputFormat

Output a single integer, which is the number of distinct structural isomers (constitutional isomers) of the alkene with formula (C_nH_{2n}), taken modulo (998244353).

sample

2
1