var readline = require('readline');
var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});

rl.on('line', function(S){
   var left = {
   SUN: 7, MON: 6, TUE: 5, WED: 4, THU: 3, FRI:2, SAT: 1
  }
 console.log(left[S]);
})
