QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 128 MB Total points: 100

#10650. Niekolejne

统计

给定一个正整数 $n$。我们希望将 $n$ 表示为尽可能多的正整数之和,要求每个数最多只能使用一次,且不能使用任意两个连续的数。

输入格式

输入的第一行包含一个整数 $n$($1 \le n \le 10^{18}$)。

输出格式

你的程序应输出一个整数:满足要求的拆分中最大的加数个数。

样例

输入

6

输出

2

Discussions

About Discussions

The discussion section is only for posting: Editorials, 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. Submitting multiple issues may cause your account to be banned.
  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.