String.prototype.splitByIndention = function () {
        return this.split('\n');
};
String.prototype.splitBySpace = function () {
        return this.split(' ');
};
Array.prototype.parseIntToEach = function () {
        return this.map(x => Number(x));
};
const input = require('fs').readFileSync('/dev/stdin', 'utf8');

function main(input) {
  var result = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1};
  console.log(result[input]);
};

main(input);

