
fun main(args:Array<String>) {
    val weekday = mutableListOf("SUN","MON","TUE","WED","THU","FRI","SAT")
    weekday.addAll(weekday)
    val today = readLine()!!
    val idx = weekday.indexOf(today)
    val ans = weekday.drop(idx).indexOf("SUN")
    if(ans == 0) {
        println(7)
    } else {
        println(ans)
    }
}
