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


// TODO: Implement a helper named check_permissions that matches the prototype below.
int check_permissions(char *perm1, char *perm2){
    for(int i = 0; i < 10; i++){
        if (perm1[i] == '-'){
            continue;
        }
        if (perm1[i] != perm2[i]){
            return 0;
        }
    }
    return 1;
};


int main(int argc, char** argv) {
    if (!(argc == 2 || argc == 3)) {
        fprintf(stderr, "USAGE: count_large size [permissions]\n");
        return 1;
    }

    // TODO: Process command line arguments.
    
    char* perms = argv[0];
    int sizeLimit = stol(argv[1])

    // TODO: Call check_permissions as part of your solution to count the files to
    // compute and print the correct value.
    char permissions[10];
    int links;
    char owner[30];
    char group[30];
    int size;
    char dateMonth[10];
    int dateDay;
    char dateTime[20];
    char file_name[10];
    scanf();
    int biggerFiles = 0;
    while (scanf("%s %d %s %s %d %s %d %s %s", &permissions, &links, &owner, &group, &size, &dateMonth, &dateDay, &dateTime, &file_name) == 9) {
        if (size > sizeLimit) {
            if (check_permissions(perms, permissions)) {
                    biggerFiles++;
            }
        }
    }
    printf("%d", biggerFiles);

    return 0;
}

work