Public Class Program
  Shared Sub Main()
    Dim s As String = Console.ReadLine()
    Dim ans As Integer = 0
    Select Case s
      Case "SUN": ans = 7
      Case "MON": ans = 6
      Case "TUE": ans = 5
      Case "WED": ans = 4
      Case "THU": ans = 3
      Case "FRI": ans = 2
      Case "SAT": ans = 1
    End Select
    Console.WriteLine(ans.ToString())
  End Sub
End Class