    function main(arg) {
        if(arg=="SUN"){console.log(7)}
        if(arg=="MON"){console.log(6)}
        if(arg=="TUE"){console.log(5)}
        if(arg=="WED"){console.log(4)}
        if(arg=="THU"){console.log(3)}
        if(arg=="FRI"){console.log(2)}
        if(arg=="SAT"){console.log(1)}
    }
    main(require('fs').readFileSync('/dev/stdin', 'utf8'));