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