#include<stdio.h>
int main(void){
  int i, n;
  scanf("%d", &n);

  int num;
  long int cul = 1;

  for(i=0;i<n;i++){
    scanf("%d", &num);
    cul *= num;
  }

  printf("%ld\n", num);

  return 0;
}