AlgoUniversity
  • Go Back
Discussion
Jump Game :

Author

Yash Sahijwani

Difficulty Level : Medium

Submissions : 418

Asked In : Walmart

Marks :10

: 2 | : 0

You can jump from $$$A$$$ to $$$B$$$, if and only if $$$B \; \% \; (B-A) = 0$$$, where $$$ \% $$$ is the modulo operator. You are given an integer $$$N$$$. Find the number of ways to reach N, if you can only use the above jumps and start at 1. Since the answer can be large, find the answer modulo $$$10^9+7$$$.

Input

The first line of input consists of a single integer $$$N$$$. $$$(1 \leq N \leq 10^5)$$$

Output

The output should consist of a single integer, the total number of ways to reach $$$N$$$.

Examples

Input
1
Output
1
Input
2
Output
1
Input
5
Output
2
Input
10
Output
31
Input
1337
Output
37318587

You need to login to view your submissions.

You need to login to view all submissions.

Loading...

Result : Executed

Loading...

Feel something is wrong with the test cases?

Result : Accepted

Test Cases :

You need to Log In
We're glad that you want to attempt this problem!

But to Run or Submit the Problem, you need to Log In.

Continue to Log In
Challenge Submitted!

Your challenge has been submitted successfully.

You will get a response soon via WhatsApp or Email.

Challenge
Facing issue while trying to solve the problem! Don't worry, we got you covered!

Do let us know your issue.

Looks good!
Please enter your issue / feedback.

How do we get in touch with you?
Looks good!
Please enter your phone no.
Looks good!
Please enter your email address.