function Main(input) {
    var week = input;
    
     if (week === "SAT") {
        console.log(1)
    } else if(week === "FRI") {
        console.log(2)
    } else if(week === "THU") {
        console.log(3)
    } else if(week === "WED") {
        console.log(4)
    } else if(week === "TUE") {
        console.log(5)
    } else if(week === "MON") {
        console.log(6)
    } else if(week === "SUN") {
        console.log(7)
    } else {
        console.log("値を出力できません")
    }
    
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
