問題一覧 > 通常問題

No.1128 Wedding Ceremony

レベル : / AI推定難易度 : 75 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 295
作問者 : WrongAccept / テスター : leafirby
お気に入りにしたユーザー ProblemId : 4600 / 自分の提出
問題文最終更新日: 2020-07-26 22:04:49
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

Problem Statement

NaN-kun has been invited to a friend's wedding, so he intends to give at least $N$ yen as a monetary wedding gift.
However, the amount he gives must not be divisible by $2$, as that would bring bad luck. Find the minimum possible amount that NaN-kun can give.

Input

$N$

$0\le N\le 10^8$
All inputs are integers.

Output

Output the answer, followed by a newline.

Sample

Sample 1
Input
2
Output
3

Output $3$, which is the smallest integer that is at least $2$ and not divisible by $2$.

Sample 2
Input
11
Output
11

$11$ is not divisible by $2$, so this is the minimum value.

Source (the problem statement has been partially modified).

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