fun func(s: String?){
  if( s == "SAT" ){
   	print("1") 
  }
  else if( s == "FRI" ){
    print("2")
  }
  else if( s == "THU" ){
    print("3")
  }
  else if( s == "WED" ){
    print("4")
  }
  else if( s == "TUE" ){
    print("5")
  }
  else if( s == "MON" ){
    print("6")
  }
  else if( s == "SUN" ){
    print("7")
  }
}


fun main(args: Array<String>) {
    val input = readLine()
	func(input)
}
