#CCBCHMOT0000058. Bội nhỏ nhất của 7 không dưới n (Smallest Multiple of Seven at Least n)

Bội nhỏ nhất của 7 không dưới n (Smallest Multiple of Seven at Least n)

Smallest Multiple of Seven at Least n

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given a nonnegative integer nn, find the smallest nonnegative integer kk such that k≥nk\ge n and kk is divisible by seven. Zero is also a multiple of seven.

Input

One line contains a nonnegative integer nn.

Output

Print the required integer kk.

Subtasks

  • Subtask 1 (20%): 0≤n≤1000\le n\le100.
  • Subtask 2 (30%): 0≤n≤1040\le n\le10^4.
  • Subtask 3 (50%): 0≤n≤1060\le n\le10^6.

Examples

Example 1

Input

15

Output

21

Explanation

The neighboring multiples are 14 and 21. Since 14<15≤21, the smallest valid result is 21.

Example 2

Input

14

Output

14

Explanation

Fourteen already is a multiple of seven, so no increment is needed.

Example 3

Input

0

Output

0

Explanation

Zero is divisible by seven and satisfies the threshold.