function main(arg) {
  var list = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
  var result = 7 - list.indexOf(arg)

  console.log(result)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
