#C8188. Maximum Directory Depth

    ID: 52142 Type: Default 1000ms 256MiB

Maximum Directory Depth

Maximum Directory Depth

You are given a file system represented by directories with various depth levels. Each directory is assigned a depth value, where the root directory is considered to be at depth 0. The overall depth of the directory system is defined as:

$$\text{max\_depth} = \max\{depths\} + 1$$

Your task is to compute this maximum depth based on the list of depth levels provided.

inputFormat

The input is provided via standard input (stdin) in the following format:

  • The first line contains a single integer \(n\) representing the number of directories.
  • The second line contains \(n\) space-separated integers representing the depth of each directory.

outputFormat

Output a single integer that denotes the maximum depth of the directory system.

## sample
7
0 1 2 1 2 3 4
5