#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define MAX_SIZE 5
#define MAX_LEN 50
typedef struct {
    int arr[MAX_SIZE];
    int top;
} Stack;
void init_stack(Stack *s) {
    s->top = -1;
}
int is_full(Stack *s) {
    return s->top == MAX_SIZE - 1;
}
int is_full(Stack *s) {
    return s->top == -1;
}
int push(Stack *s, int val) {
    if (is_full(s)) {
        return 0;
    }
    s->arr[++(s->top)] = val;
    return 1;
}
int peek(Stack *s, int *val) {
    if (is_empty(s)) {
        return 0;
    }
    *val = s->arr[s->top];
    return 1;
}
int is_valid_integer(char *str) {
    int i = 0;
    if (str[0] == '-') i = 1;
    if (str[i] == '\0') return 0;
    for (; str[i] != '\0'; i++) {
        if (!isdigit(str[i])) return 0;
    }
    return 1;
}
int main() {
    int n;
    if (scanf("%d\n", &n) !=1) {
        printf("Invalid input\n");
        return 0;
    }