import std.stdio;
import std.string;

void main() {
  string s = readln.chomp;
  if (s == "SUN") writeln(7);
  if (s == "MON") writeln(1);
  if (s == "TUE") writeln(2);
  if (s == "WED") writeln(3);
  if (s == "THU") writeln(4);
  if (s == "FRI") writeln(5);
  if (s == "SAT") writeln(6);
}
