#K50947. Minimal Fuel Consumption

    ID: 28977 Type: Default 1000ms 256MiB

Minimal Fuel Consumption

Minimal Fuel Consumption

You are given an integer N representing the number of modules, and a list of integers representing the energy costs for each module. The task is to compute the minimum energy cost required to propel from the first module to any module.

In mathematical form, given $N$ modules and an array $C = [c_1, c_2, \dots, c_N]$, you are required to compute:

$$\min_{1 \leq i \leq N} c_i$$

It is guaranteed that the list of energy costs has exactly N elements.

inputFormat

The input is read from stdin and consists of two lines:

  • The first line contains an integer N representing the number of modules.
  • The second line contains N space-separated integers, where the i-th integer represents the energy cost ci for the i-th module.

outputFormat

Output the minimum energy cost as an integer to stdout.

## sample
5
3 1 4 1 5
1