function Main(input) {
  input.trim();
  var ans = 0
switch(input){
  case "SUN\n" :
  ans++;
  case "MON\n" :
  ans++;
  case "TUE\n" :
  ans++;
  case "WED\n" :
  ans++;
  case "THU\n" :
  ans++;
  case "FRI\n" :
  ans++;
  case "SAT\n" :
  ans++;
 }
 console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));