QOJ.ac

QOJ

時間限制: 0.2 s 記憶體限制: 256 MB 總分: 10

#219. PIN

统计

Bajtek has forgotten his phone password. He remembers that it consisted of three distinct positive integers $a < b < c$ separated by hashes. Additionally, the sum of these numbers was $n$, and for every pair of numbers (among $(a, b)$, $(a, c)$, and $(b, c)$), one of the numbers was a multiple of the other.

Help him count how many possible triples he must check so he can decide whether it is worth wasting time on it or if it is better to buy a new phone.

Input

The first and only line of input contains a single integer $n$ ($1 \le n \le 10^9$).

Output

Output a single integer – the number of such triples $(a, b, c)$.

Examples

Input 1

35

Output 1

2

Note

The two triples are $(1, 2, 32)$ and $(5, 10, 20)$.

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.