import java.util.*

fun main(args: Array<String>) {
    val read = Scanner(System.`in`)

    val s = read.next()

    when(s) {
        "SUN" -> println(7)
        "MON" -> println(6)
        "TUE" -> println(5)
        "WED" -> println(4)
        "THU" -> println(3)
        "FRI" -> println(2)
        "SAT" -> println(1)
    }
}
