fun main(args: Array<String>) {
  val day: String = readLine()!!
    when(day) {
    Weekday.SUN.toString() -> println(Weekday.SUN.restDay)
    Weekday.MON.toString() -> println(Weekday.MON.restDay)
    Weekday.TUE.toString() -> println(Weekday.TUE.restDay)
    Weekday.WED.toString() -> println(Weekday.WED.restDay)
    Weekday.THU.toString() -> println(Weekday.THU.restDay)
    Weekday.FRI.toString() -> println(Weekday.FRI.restDay)
    Weekday.SAT.toString() -> println(Weekday.SAT.restDay)
  }
}

enum class Weekday(val restDay: Int){
  SUN(7),
  MON(6),
  TUE(5),
  WED(4),
  THU(3),
  FRI(2),
  SAT(1)
}