Type: Default 1000ms 256MiB

这是一道放ak题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Problem Description

传说中,有一只神奇的兔子,它有着特殊的繁殖规律。

  • 在第1个月,只有1对兔子。
  • 在第2个月,还是只有1对兔子。
  • 从第3个月开始,每个月的兔子总对数等于前两个月兔子总对数之和。

给定一个整数 nn,请你计算在第 nn 个月时,总共有多少对兔子,并对998244353取模。

Input Format

输入一个整数 nn 表示第 nn 个月

Output Format

输出一个整数,表示第 nn 个月时兔子的数量。

Sample

Input11

3

Output11

2

Input22

114514

Output22

855088846

Hint

1≤n≤1e61 \le n \le 1e6

第十一届重庆邮电大学萌新赛

Not Attended
Status
Done
Rule
XCPC
Problem
10
Start at
2025-11-2 13:00
End at
2025-11-2 18:00
Duration
5 hour(s)
Host
Partic.
3