void main()
{
    string s = readln.chomp;

    int[string] week;
    week["SAT"] = 1;
    week["FRI"] = 2;
    week["THU"] = 3;
    week["WED"] = 4;
    week["TUE"] = 5;
    week["MON"] = 6;
    week["SUN"] = 7;

    week[s].writeln;
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;