#include <bits/stdc++.h>
int main(void) {
  int N, n, flag;
  double buf;
  double* v;
  scanf("%d", &N);
  v = (double*)malloc(sizeof(double) * N);
  for (int i = 0; i < N; i++) {
    scanf("%lf", &v[i]);
  }
  printf("%lf\n", v[N - 1]);
  free(v);
  return 0;
}
