import io.StdIn._
object Main extends App {
  val res = readLine match {
    case "SUN" => 7
    case "MON" => 6
    case "TUE" => 5
    case "WED" => 4
    case "THU" => 3
    case "FRI" => 2
    case "SAT" => 1
  }
  println(res)
}
