We can rewrite a binary string (i.e. strings where only $0$ or $1$ is included) $s$ as $kp+p'$. $p'$ is a prefix of $p$ ($p'$ could be empty). $+p'$ means concatenating $p'$ to the last of $kp$. $kp$ means concatenating $k$ copies of $p$, where $p$ is the unit of $s$.
The unit of a binary string $s$ is when ignoring $p'$, the non-empty string $p$ which makes $k$ maximal.
We define $v(s)$ as the value of $s$, which is $k$ in the previous statement. For example, $v(01001001)=2$, because $01001001$ could be written as $2(010)+(01)$, and $v(11111)=5$ since $11111$ could be written as $5(1)$ and $p'$ is empty .
Now given $n$, your task is to calculate the sum of the value of all binary strings whose length is exactly $n$. As the answer could be very large, just output the answer modulo $998244353$.