// editor3
#include<stdio.h>
#include<stdlib.h>

typedef struct node{
    int data;
    struct node*next;
}node;
node*head=NULL,*tail;

void insertnode(int r,int *count){
    node*newnode=(node*)malloc(sizeof(node));
    newnode->data=r;
    newnode->next=NULL;
    if(head==NULL){
        head=newnode;
        tail=newnode;
    }
    else{
        tail->next=newnode;
        tail=newnode;
    }
    ++*count;
}


int main(){
    int n,r,count=0;
    scanf("%d",&n);
    if(n<0){
        printf("Invalid input");
        return 0;
    }
    for(int i=0;i<n;i++){
        scanf("%d",&r);
        insertnode(r,&count);
    }
    printf("%d",);
    return 0;
}