#include <stdio.h>
#include <stdlib.h>

typedef struct Node{
    int data;
    struct Node* next;
    struct Node* prev;
} Node;
Node* createNode(int data){
    Node*newNode=(Node*)malloc(sizeof(Node)); 
        if(!newNode){
            printf("Memory error\n");
            return NULL;
        }
        newNode->data=data;
        newNode->next=newNode->prev=NULL;
        return newNode;
}
int findLargest(Node*head){
    int maxVal=head->data;
    Node*temp=head;
    while(temp!=NULL){
        if(temp->data>maxVal){
            maxVal=temp->data;
        }
        temp=temp->next;
    }
    return maxVal;
}
int main() {
    int n;
    scanf("%d", &n);
    if (n <= 0) {
        printf("Invalid input\n");
        return 0;
}