F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

number number number

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1910    Accepted Submission(s): 1104


Problem Description
We define a sequence $F$:

$\cdot$ $F_0=0, F_1=1$;
$\cdot$ $F_n=F_{n-1}+F_{n-2}\ (n\geq 2)$.

Give you an integer $k$, if a positive number $n$ can be expressed by
$n=F_{a_1}+F_{a_2}+...+F_{a_k}$ where $0\leq a_1 \leq a_2 \leq \dots \leq a_k$, this positive number is $mjf-good$. Otherwise, this positive number is $mjf-bad$.
Now, give you an integer $k$, you task is to find the minimal positive $mjf-bad$ number.
The answer may be too large. Please print the answer modulo 998244353.
 

Input
There are about 500 test cases, end up with EOF.
Each test case includes an integer $k$ which is described above. ($1\leq k \leq 10^9$)
 

Output
For each case, output the minimal $mjf-bad$ number mod 998244353.
 

Sample Input
1
 

Sample Output
4
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-21 22:00:50, Gzip enabled