N = int(input()) ans = ["Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday"] print((N - 1) % 7)