object Main extends App {
  val v = readLine match {
    case "SUN" => 0
    case "MON" => 1
    case "TUE" => 2
    case "WED" => 3
    case "THU" => 4
    case "FRI" => 5
    case "SAT" => 6
    case _ => 999999
  }
  
  println(7-v)
}