QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 64 MB 満点: 100

#16441. Continuous Number Partition of N

統計

Every positive integer can be represented as the sum of one or more consecutive positive integers. Given a positive integer $n$ not exceeding $9 \times 10^{14}$, find the number of different ways it can be represented as a sum of consecutive positive integers. For example, for $9$, there are three ways: $9$, $4+5$, and $2+3+4$.

Input

Input a single integer $n$, where $1 \le n \le 9 \times 10^{14}$.

Output

Output the number of ways to represent $n$ as a sum of consecutive positive integers.

Examples

Input 1

9

Output 1

3

Input 2

11

Output 2

2

Input 3

12

Output 3

2

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.