#K33502. Maximum Wall Height

    ID: 25101 Type: Default 1000ms 256MiB

Maximum Wall Height

Maximum Wall Height

In this problem, you are given an integer n representing the number of wall segments, and a list of n integers representing the height of each segment. According to the village rule, the maximum wall height is the sum of all given heights. Mathematically, the wall height H is calculated as:

$$H = \sum_{i=1}^{n} h_i$$

Your task is to compute and output this maximum wall height.

inputFormat

The input is provided through stdin and consists of two lines:

  • The first line contains an integer n — the number of wall segments.
  • The second line contains n space-separated integers, where each integer represents the height of a wall segment.

outputFormat

Output through stdout a single integer representing the maximum wall height that can be obtained by summing all wall segments.

## sample
6
1 2 3 6 7 8
27