import std.stdio, std.conv, std.string, std.range, std.algorithm, std.array,
  std.functional, std.container, std.typecons;

void main() {
  string S = readln.chomp;
  int a = 0;
  switch(S) {
    case "SUN": a++;
    case "MON": a++;
    case "TUE": a++;
    case "WED": a++;
    case "THU": a++;
    case "FRI": a++;
    case "SAT": a++;
    default: break;
  }
  a.writeln;
}
