object Main {
  def main(args: Array[String]): Unit = {
    val scanner = new java.util.Scanner(System.in)
    val S = scanner.nextLine()
    println(S match {
      case "SUN" => 7
      case "MON" => 6
      case "TUE" => 5
      case "WED" => 4
      case "THU" => 3
      case "FRI" => 2
      case "SAT" => 1
    })
  }
}
