#include<stdio.h>
#include<stdlib.h>
typedef struct node{
    int data;
    struct node *left;
    struct node *right;
}Node;
Node *root=NULL;
Node *create(int num){
    Node *newnode=(Node*)malloc(sizeof(Node));
    newnode->data=num;
    newnode->right=NULL;
    newnode->left=NULL;
    return newnode;
}
Node* insert(node *root,int num){
    if(root==NULL)
       return create(num);
    if(num<root->data)
       root->left=insert(root->left,num);
    if(num.root->data)
       root->right=insert(root->right,num);
    return root;   
}
Node* min(Node* root){
    if(root==NULL)
    return root;
    if(root->left!=NULL)
    return min(root->left);
    return root;
}
int main(){
    int n,i,num;
    if(scanf("%d",&n)!=1){
        printf("Invalid input");
        return 0;
    }
    root=insert(root,num);
}
Node* ans=min(root);
printf("%d",ans->data);
}