import java.util.Scanner

object Main extends App{
  val sc = new Scanner(System.in)

  val s = sc.next

  val res = s match {
    case "SUN" => 7
    case "MON" => 6
    case "TUE" => 5
    case "WED" => 4
    case "THU" => 3
    case "FRI" => 2
    case "SAT" => 1
  }

  println(res)
}
