403063: GYM100989 A LCS (A)

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. LCS (A)time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Haneen is trying to solve an easy problem given by Dr. Ibrahim in the Algorithms course. The problem is to find the lexicographically smallest Longest Common Subsequence (LCS) between two strings. Unfortunately, she got many runtime errors. After tens of wrong submissions, she asked Master Hazem about the problem and he replied:

"C strings are terminated with the null character ‘\0’. When you want to store a string of length N, the size of the array should be at least N + 1."

Haneen didn’t get anything of what he said, and now, she is in need of your help! Given the length of the string Haneen has, determine the minimum size of an array needed to store this string.

Input

The input contains a single integer N (1 ≤ N ≤ 105), the length of the string.

Output

Print the minimum size of an array needed to store the string.

ExamplesInput
3
Output
4
Input
7
Output
8
Input
64
Output
65

加入题单

上一题 下一题 算法标签: