問題一覧 > 通常問題

No.835 Juice

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 569
作問者 : nmnmnmnmnmnmnm / テスター : ciel
お気に入りにしたユーザー ProblemId : 2502 / 自分の提出
問題文最終更新日: 2019-08-08 01:56:15
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 215 (順位表) の他の問題:

Problem Statement

You bought $N$ bottles of juice, each containing $1.5$ liters, and transferred the juice into $M$ empty containers, each with a capacity of $1$ liter.
After the transfer, all $M$ of the $1$-liter containers were full, and the leftover juice that did not fit into the containers was less than 1 liter.
Given $N$, find $M$.

Input

$N$

$N$ is a positive integer. $1 \le N \le 1000000000 = 10^9$.

Output

Output the answer on one line.
Print a newline at the end.

Sample

Sample 1
Input
1
Output
1

You bought $1$ bottle of $1.5$ liters of juice.
You transferred it into $1$ container of $1$ liter, and $0.5$ liters of juice, which is less than $1$ liter, was left over.

Sample 2
Input
2
Output
3

You bought $2$ bottles of $1.5$ liters of juice.
You transferred it into $3$ containers of $1$ liter each, and there was no leftover juice of less than $1$ liter.

Sample 3
Input
3
Output
4

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。