// editor5
#include<stdio.h>
#include<stdlib.h>
typedef struct node{
    int data;
    struct node*next;
}node;

node*head=NULL,*tail;

void create(int num){
    node*newnode=(node*)malloc(1*sizeof(node));
    newnode->data=num ;
    newnode->next=NULL;
    
    if(head==NULL){
        head=newnode;
        tail=newnode;
    }else{
        tail->next=newnode;
        tail=newnode;
    }
}
int mid(){
    node*slow=head,*fast=head;
    while(fast!=NULL && fast->next!=NULL){
        slow=slow->next;
        fast=fast->next;
    }
    return slow->data;
}
int main(){
    int n,num,i;
    scanf("%d",&n);
    
    if(n<0 || n>100){
        printf("Invalid Input");
        return 0;
    }
    for(i=0;i<n;i++){
        scanf("%d",&num);
        create(num);
    }
    if(head==NULL){
    printf("Invalid Input");
    return 0;
    }
    printf("%d",mid());
    return 0;
}
}