#include <stdio.h>
#include <stdlib.h>
#include <string.h>



int parse_int(char *s, int *out) {
    // TODO: implement this function
    (void) s;
    (void) out;
    return 0;
}


int main(void) {
    char s[1000];
    if (fgets(s, sizeof s, stdin) == NULL) { s[0] = '\0'; }
    s[strcspn(s, "\n")] = '\0';
    int value;
    if (parse_int(s, &value)) { printf("%d\n", value); }
    else { printf("invalid\n"); }
    return 0;
}
