public class Solution {
    public static void main(String[] args) throws Exception {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        String input = buffer.readLine();
        int dayWeek = Integer.parseInt(input);
        GregorianCalendar myCalendar = new GregorianCalendar();
        myCalendar.set(Calendar.DAY_OF_WEEK, dayWeek);
        SimpleDateFormat myDateFormat = new SimpleDateFormat("EEEE");
        System.out.println(myDateFormat.format(myCalendar.get(Calendar.DAY_OF_WEEK)));
    }
}