'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	const S = args[0][0]

	const weeks = {
		'SUN': 7,
		'MON': 6,
		'TUE': 5,
		'WED': 4,
		'THU': 3,
		'FRI': 2,
		'SAT': 1
	}

	console.log(weeks[S])
}

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