#include<stdio.h>
#include<stdlib.h>
struct node 
{
    int data;
    struct node *next;
};
int main()
{
    int n;
    scanf("%d",&n);
    if(n<0)
    {
        printf("Invalid Input");
        return 0;
    }
    struct node *head = NULL,*temp,*newnode;
    int value;
    for(int i=0;i<n;i++)
    {
        scanf("%d",&value);
        newnode = (struct node*)malloc(sizeof(struct node ));
        newnode->data = value;
        newnode->next = NULL;
        if(head == NULL)
        {
            head = newnode;
        }
        else
        {
         temp = head;
         while(temp->next != NULL)
         temp = temp->next;
         temp->next = newnode;
        }
    
        }
        int count = 0;
        temp = head;
        while(temp != NULL)
        {
            count++;
            temp = temp->next;
        }
        printf("%d",count);
        return 0;
    }
}