Problem:
 Score : 100 points    Problem Statement Given is a string S representing the day of the week today.  S is SUN , MON , TUE , WED , THU , FRI , or SAT , for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively.  After how many days is the next Sunday (tomorrow or later)?      Constraints  S is SUN , MON , TUE , WED , THU , FRI , or SAT .         Input Input is given from Standard Input in the following format:  S       Output Print the number of days before the next Sunday.        Sample Input 1 SAT      Sample Output 1 1  It is Saturday today, and tomorrow will be Sunday.       Sample Input 2 SUN      Sample Output 2 7  It is Sunday today, and seven days later, it will be Sunday again.

Solution (Python):
S = input()
if S == "SUN":
    print(7)
elif S == "MON":
    print(6)
elif S == "TUE":
    print(5)
elif S == "WED":
    print(4)
elif S == "THU":
    print(3)
elif S == "FRI":
    print(2)
elif S == "SAT":
    print(1)

Solution (Python):
S=str(input())
list=["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(7):
  if S==list[i]:
    print(7-i)

Solution (Python):
input_str = str(input())

week = {"SUN":7, "MON":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1}
print(week[input_str])

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def solve():
    s = input().rstrip()
    a = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
    print(7-a.index(s))
    return



if __name__ == '__main__':
    solve()

Solution (Python):
a = input()

arr = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

N = arr.index(a)

print(int(7-N))

Solution (Python):
print((7 - ["SUN","MON","TUE","WED","THU","FRI","SAT"].index(input())))

Solution (Python):
S=input()

T=['SAT','FRI','THU','WED','TUE','MON','SUN']

for i in range(8):
    if S==T[i]:
        print(i+1)
        break

Solution (Python):
S=input()
w=['SAT','FRI','THU','WED','TUE','MON','SUN']

print(w.index(S)+1)

Solution (Python):
d = input()
d_list =['SUN','SAT', 'FRI','THU', 'WED', 'TUE', 'MON', 'SUN']
a = d_list.index(d)
if a !=0:
    print(a % 7)
else:
    print(7)

Solution (Python):
n = input()
if n == 'SUN':
  print('7')
elif n == 'MON':
  print('6')
elif n == 'TUE':
  print('5')
elif n == 'WED':
  print('4')
elif n == 'THU':
  print('3')
elif n == 'FRI':
  print('2')
elif n == 'SAT':
  print('1')

Solution (Python):
S = input() 
D = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
C=0
for i in D :
    Ans = 7 - C
    if i == S : print(Ans)
    C += 1

Solution (Python):
s = input()
t = 0
if s == 'SUN':
    t = 0
elif s == 'MON':
    t = 1
elif s == 'TUE':
    t = 2
elif s == 'WED':
    t = 3
elif s == 'THU':
    t = 4
elif s == 'FRI':
    t = 5
elif s == 'SAT':
    t = 6
print(7-t)

Solution (Python):
days=['SUN','MON','TUE','WED','THU','FRI','SAT']
in_day=input()
inx=days.index(in_day)
out_day=7-inx
print(out_day)

Solution (Python):
s = input()
if s[0] == "M":
    print(6)
elif s[0] == "T":
    if s[1] == "U":
        print(5)
    else:
        print(3)
elif s[0] == "W":
    print(4)
elif s[0] == "F":
    print(2)
else:
    if s[1] == "A":
        print(1)
    else:
        print(7)

Solution (Python):
S = input()

a = "SUN"
b = "MON"
c = "TUE"
d = "WED"
e = "THU"
f = "FRI"
g = "SAT"
if S == a:
    print(7)
if S == b:
    print(6)
if S == c:
    print(5)
if S == d:
    print(4)
if S == e:
    print(3)
if S == f:
    print(2)
if S == g:
    print(1)

Solution (Python):
a = input()
if a == 'SUN':
    print(7)
elif a == 'MON':
    print(6)
elif a == 'TUE':
    print(5)
elif a == 'WED':
    print(4)
elif a == 'THU':
    print(3)
elif a == 'FRI':
    print(2)
elif a == 'SAT':
    print(1)

Solution (Python):

S = str(input())
H = ['SUN','MON','TUE','WED','THU','FRI','SAT','SUN']
tmp = 0

ans = 0

tmp = H.index(S)
ans = 7 - tmp 
  

print(ans)

Solution (Python):
s = input()

if s == "SUN":
    print(7)
elif s == "MON":
    print(6)
elif s == "TUE":
    print(5)
elif s == "WED":
    print(4)
elif s == "THU":
    print(3)
elif s == "FRI":
    print(2)
else:
    print(1)

Solution (Python):
S=input()
if S=="SUN": print(7)
if S=="MON": print(6)
if S=="TUE": print(5)
if S=="WED": print(4)
if S=="THU": print(3)
if S=="FRI": print(2)
if S=="SAT": print(1)

Solution (Python):
S = input()

if S == ("SUN"):
    print(7)
elif S == ("MON"):
    print(6)
elif S == ("TUE"):
    print(5)
elif S == ("WED"):
    print(4)
elif S == ("THU"):
    print(3)
elif S == ("FRI"):
    print(2)
elif S == ("SAT"):
    print(1)

Solution (Python):
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
s=input()
try:
  a = l.index(s)
except:
  a = 0

print (7-a)

Solution (Python):
S = input()

L = [ "SUN","MON","TUE","WED","THU","FRI","SAT" ]
L.reverse()

ans = 0
for i in range(len(L)):
    if S == L[i]:
        ans = i + 1
        break
print(ans)

Solution (Python):
s = str(input())

week = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

print(7-week.index(s))

Solution (Python):
string = input()


if string =="SUN":
  print(str(7))
elif string == "MON":
  print(str(6))
elif string == "TUE":
  print(str(5))
elif string == "WED":
  print(str(4))
elif string == "THU":
  print(str(3))
elif string == "FRI":
  print(str(2))
elif string == "SAT":
  print(str(1))

Solution (Python):
s = input()
youbi = ['SUN','MON','TUE','WED','THU','FRI','SAT']
if s == 'SUN':
    print('7')
else:
    for i in youbi:
        if i == s:
            print(7-youbi.index(i))

Solution (Python):

s = input()
weeks = ['L_SUN', 'SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON','SUN']
print(weeks.index(s))

Solution (Python):
W=["SUN","MON","TUE","WED","THU","FRI","SAT"]
W.reverse()
print(W.index(input())+1)

Solution (Python):
day_dict = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
day = input()
print(day_dict[day])

Solution (Python):
s = input()
if s == "SUN":
    print(7)
if s == "MON":
    print(6)
if s == "TUE":
    print(5)
if s == "WED":
    print(4)
if s == "THU":
    print(3)
if s == "FRI":
    print(2)
if s == "SAT":
    print(1)

Solution (Python):
print(7-["SUN","MON","TUE","WED","THU","FRI","SAT"].index(input()))

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32
w =  ['SUN','MON','TUE','WED','THU','FRI','SAT']

def solve(S: str):
    we = w+w
    n = w.index(S)
    if n == 0:
        print(7)
    else:
        print(we[n:].index('SUN'))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
ARR = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
S = input()
diff = 6 - ARR.index(S)
if diff==0:
  print(7)
else:
  print(diff)

Solution (Python):

s=input()
if s=="SAT":
	print(1)
elif s=='SUN':
	print(7)
elif s=="FRI":
	print(2)
elif s=="THU":
	print(3)
elif s=="WED":
	print(4)
elif s=="TUE":
	print(5)
elif s=='MON':
	print(6)

Solution (Python):
S=input()
if S=="SUN":
    print(7)
elif S=="MON" :
    print(6)
elif S=="TUE" :
    print(5)
elif S=="WED" :
    print(4)
elif S=="THU" :
    print(3)
elif S=="FRI" :
    print(2)
else:
    print(1)

Solution (Python):
S = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = input()
for i in range(7):
  if s == S[i]:
    print(7-i)

Solution (Python):




now_yobi = input()

if now_yobi == 'SUN':
    print(7)
elif now_yobi == 'MON':
    print(6)
elif now_yobi == 'TUE':
    print(5)
elif now_yobi == 'WED':
    print(4)
elif now_yobi =='THU':
    print(3)
elif now_yobi == 'FRI':
    print(2)
else:
    print(1)

Solution (Python):
s = input()
ans = 0
if s == 'SUN':
  ans = 7
elif s == "MON":
  ans = 6
elif s == "TUE":
  ans = 5
elif s == "WED":
  ans = 4
elif s == "THU":
  ans = 3
elif s == "FRI":
  ans = 2
elif s == "SAT":
  ans = 1
print(ans)

Solution (Python):
s=input()
d=["SUN","MON","TUE","WED","THU","FRI","SAT"]
a=0
for i in range(7):
  if d[i]==s:
    a=7-i
    break
print(a)

Solution (Python):
d = input()
week = {
    'SUN':7,
    'MON':6,
    'TUE':5,
    'WED':4,
    'THU':3,
    'FRI':2,
    'SAT':1 
}
print(week[d])

Solution (Python):
from sys import stdin
days = ['SUN','MON','TUE','WED','THU','FRI','SAT']

today = stdin.readline().rstrip()
print(7-days.index(today))

Solution (Python):
S = str(input())

L = ['.', 'SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']

print(L.index(S))

Solution (Python):
x = {
  "SAT": 1,
  "FRI": 2,
  "THU": 3,
  "WED": 4,
  "TUE": 5,
  "MON": 6,
  "SUN": 7
}
day = input().strip()
print (x[day])

Solution (Python):
S = input()
S= str(S)
dic = {}
dic["SUN"] = 7
dic["MON"] = 6
dic["TUE"] = 5
dic["WED"] = 4
dic["THU"] = 3
dic["FRI"] = 2
dic["SAT"] = 1

out = dic[S]
print(out)

Solution (Python):
W=[0,"SAT","FRI","THU","WED","TUE","MON","SUN"]
print(W.index(input()))

Solution (Python):
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
S = input()

if S in days:
  days_till_next_sunday = len(days) - days.index(S)

print(days_till_next_sunday)

Solution (Python):
s=input()
if s=="SUN":
    print(7)
elif s=="MON":
    print(6)
elif s=="TUE":
    print(5)
elif s=="WED":
    print(4)
elif s=="THU":
    print(3)
elif s=="FRI":
    print(2)
else:
    print(1)

Solution (Python):
days = ['SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']
S = input()
for i in range(7):
    if S == days[i]:
        print(i + 1)

Solution (Python):
S = input()
D = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
print(D[S])

Solution (Python):
i =input()


  
if i == "SUN":
  print("7")
elif i == "MON":
  print("6")
elif i == "TUE":
  print("5")
elif i == "WED":
  print("4")
elif i == "THU":
  print("3")
elif i == "FRI":
  print("2")
else:
  print("1")

Solution (Python):
S = input()
if S == 'SUN':
	print(7)
elif S == 'MON':
	print(6)
elif S == 'TUE':
	print(5)
elif S == 'WED':
	print(4)
elif S == 'THU':
	print(3)
elif S == 'FRI':
	print(2)
elif S == 'SAT':
	print(1)
else:
  print(-1)

Solution (Python):
S = input()

li = ['SAT','FRI','THU','WED','TUE','MON','SUN']

for i,j in enumerate(li):
    if(S==j):
        print(i+1)

Solution (Python):
s = input()
mylist = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7 - (mylist.index(s)))

Solution (Python):
wd = input()
weeks = ['SUN','MON','TUE','WED','THU','FRI','SAT']
i = weeks.index(wd)
print(7 - i)

Solution (Python):
s = input()
if s == 'MON':
    print(6)
if s == 'TUE':
    print(5)
if s == 'WED':
    print(4)
if s == 'THU':
    print(3)
if s == 'FRI':
    print(2)
if s == 'SAT':
    print(1)
if s == 'SUN':
    print(7)

Solution (Python):
con_s = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
s = str(input())
total = 7
if (s in con_s):
  for i, val in enumerate(con_s):
    if (val == s):
      break
    else:
      total -= 1
print(total)

Solution (Python):
S = input()
D = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
idx = D.index(S)
print(7-idx)

Solution (Python):
import sys
sys.setrecursionlimit(int(1e6))

S = input()

lut = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2,'SAT': 1}
ans = lut[S]
print(ans)

Solution (Python):
week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
s = input()
ind = week.index(s)
print(7 - ind)

Solution (Python):
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
S = input()

if S in days:
  days_till_next_sunday = len(days) - days.index(S)

print(days_till_next_sunday)

Solution (Python):
s=str(input())
if(s=="SUN"):
    print("7")
elif(s=="MON"):
    print("6")
elif(s=="TUE"):
    print("5")
elif(s=="WED"):
    print("4")
elif(s=="THU"):
    print("3")
elif(s=="FRI"):
    print("2")
elif(s=="SAT"):
    print("1")

Solution (Python):
S=input()
if S=='SUN':
    print(7)
if S=='SAT':
    print(1)
if S=='FRI':
    print(2)
if S=='THU':
    print(3)
if S=='WED':
    print(4)
if S=='TUE':
    print(5)
if S=='MON':
    print(6)

Solution (Python):
S = input()
d_dow = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1,}
diff = d_dow[S]
print(diff)

Solution (Python):
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math



n = stdin.readline().rstrip()
if n == 'SUN':
    print(7)
if n == 'MON':
    print(6)
if n == 'TUE':
    print(5)
if n == 'WED':
    print(4)
if n == 'THU':
    print(3)
if n == 'FRI':
    print(2)
if n == 'SAT':
    print(1)

Solution (Python):
n = (input())
if n == "SUN":
         print(7)
elif n == "MON":
         print(6)
elif n == "TUE":
         print(5)
elif n == "WED":
         print(4)
elif n == "THU":
         print(3)
elif n == "FRI":
         print(2)
elif n == "SAT":
         print(1)

Solution (Python):
ls = [ 'SUN','MON','TUE','WED','THU','FRI','SAT' ]
s = input()

for i in range(len(ls)):
    if s == ls[i]:
        print(len(ls) - i)
        break

Solution (Python):
def main():
    s = input()
    d = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1}
    print(d[s])

main()

Solution (Python):
s = str(input())
day_of_the_week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7 - day_of_the_week.index(s))

Solution (Python):
l = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1}
S = input().rstrip()
print(l[S])

Solution (Python):
s = input()
w = ['SUN','MON','TUE','WED','THU','FRI','SAT']
n = [7,6,5,4,3,2,1]

for i in range(7):
  if s == w[i]:
    print(n[i])

Solution (Python):
print('SATFRITHUWEDTUEMONSUN'.find(input())//3+1)

Solution (Python):
day = str(input())
if day == "SAT":
	print("1")
elif day == "FRI":
	print("2")
elif day == "THU":
	print("3")
elif day == "WED":
	print("4")
elif day == "TUE":
	print("5")
elif day == "MON":
	print("6")
else:
	print("7")

Solution (Python):
S = input()
week = {"MON":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1, "SUN":7}
print(week[S])

Solution (Python):
a = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT", "?"]
a.reverse()
S = input().strip()

for i, wd in enumerate(a):
    if wd == S:
        print(i)

Solution (Python):
s = input()


if s=='SUN':
    ans = 7
elif s=='MON':
    ans = 6
elif s=='TUE':
    ans = 5
elif s=='WED':
    ans = 4
elif s=='THU':
    ans = 3
elif s=='FRI':
    ans = 2
elif s=='SAT':
    ans = 1

print(ans)

Solution (Python):
s=input()
if s=="SUN":
  print(7)
if s=="MON":
  print(6)
if s=="TUE":
  print(5)
if s=="WED":
  print(4)
if s=="THU":
  print(3)
if s=="FRI":
  print(2)
if s=="SAT":
  print(1)

Solution (Python):
S = input()
Ans = 0
if S == 'SUN':
  Ans = 7

if S == 'MON':
  Ans = 6

if S == 'TUE':
  Ans = 5

if S == 'WED':
  Ans = 4

if S == 'THU':
  Ans = 3

if S == 'FRI':
  Ans = 2

if S == 'SAT':
  Ans = 1

print(Ans)

Solution (Python):
S=input()
if S=="SUN":print("7")
if S=="MON":print("6")
if S=="TUE":print("5")
if S=="WED":print("4")
if S=="THU":print("3")
if S=="FRI":print("2")
if S=="SAT":print("1")

Solution (Python):
S=input()
if S=="SUN":
    print("7")
elif S=="MON":
    print("6")
elif S=="TUE":
    print("5")
elif S=="WED":
    print("4")
elif S=="THU":
    print("3")
elif S=="FRI":
    print("2")
elif S=="SAT":
    print("1")

Solution (Python):
s = input()
d = {
    "SUN": 7,
    "MON": 6,
    "TUE": 5,
    "WED": 4,
    "THU": 3,
    "FRI": 2,
    "SAT": 1
}
print(d[s])

Solution (Python):
S = input()
youbi = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
youbi.reverse()

print(1 + youbi.index(S))

Solution (Python):
dayofweek = input()
days = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
output = days.index("SUN") - days.index(dayofweek) if dayofweek != "SUN" else 7
print(output)

Solution (Python):
dict = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1 }
print(dict[input()])

Solution (Python):
def main():
    s = input()

    if s == "SUN":
        print(7)
    elif s == "MON":
        print(6)
    elif s == "TUE":
        print(5)
    elif s == "WED":
        print(4)
    elif s == "THU":
        print(3)
    elif s == "FRI":
        print(2)
    else:
        print(1)

if __name__ == "__main__":
    main()

Solution (Python):
s=input()
if s == "SUN" :
  print(7)
if s == "MON":
  print(6)
if s == "TUE":
  print(5)
if s == "WED":
  print(4)
if s == "THU":
  print(3)
if s == "FRI":
  print(2)
if s == "SAT":
  print(1)

Solution (Python):
S = input()

if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Solution (Python):
import numpy as np

S=input()
W=np.array(["SUN","MON","TUE","WED","THU","FRI","SAT"])
i=np.where(W==S)[0][0] 

print(7-i)

Solution (Python):
S = str(input())

s = {
    "SUN":7,
    "MON":1,
    "TUE":2,
    "WED":3,
    "THU":4,
    "FRI":5,
    "SAT":6
}

for k,v in s.items():
    if k == S:
        num = 7 - v 
        if num == 0:
            print(7)
        else:
            print(num)

Solution (Python):
S = input()
d = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7 - d.index(S))

Solution (Python):
a = input()

if(a=="SUN"):
  print(7)
elif(a=="MON"):
  print(6)
elif(a=="TUE"):
  print(5)
elif(a=="WED"):
  print(4)
elif(a=="THU"):
  print(3)
elif(a=="FRI"):
  print(2)
elif(a=="SAT"):
  print(1)

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 








a = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

d = {c:i for i,c in enumerate(a)}

s = input()

n = d[s]

print((-n)%7+(0 if n else 7))

Solution (Python):
S =input()
if S == 'SUN':
    print('7')
elif S == 'MON':
    print('6')
elif S == 'TUE':
    print('5')
elif S =='WED':
    print('4')
elif S =='THU':
    print('3')
elif S =='FRI':
    print('2')
elif S =='SAT':
    print('1')

Solution (Python):
s = input()

d = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']

print(7- d.index(s))

Solution (Python):
a = ['SUN','MON','TUE','WED','THU','FRI','SAT']
a = list(reversed(a))
S = input()
print(a.index(S)+1)

Solution (Python):
S = input()
if S == 'SUN':
  print(7)
elif S  == 'MON':
  print(6)
elif S == 'TUE':
  print(5)
elif S == 'WED':
  print(4)
elif S == 'THU':
  print(3)
elif S == 'FRI':
  print(2)
elif S == 'SAT':
  print(1)

Solution (Python):
s = input()
if(s == "SUN"):
    print(7)
elif(s == "MON"):
    print(6)
elif(s == "TUE"):
    print(5)
elif(s == "WED"):
    print(4)
elif(s == "THU"):
    print(3)
elif(s == "FRI"):
    print(2)
elif(s == "SAT"):
    print(1)

Solution (Python):
s = input()
w = ['SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']
for i in range(len(w)):
  if s == w[i]:
    a = i + 1
print(a)

Solution (Python):
S = input()
ans = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1}
print(ans[S])

Solution (Python):
day = input()
lis = ["XXX", "SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"]
print(lis.index(day))

Solution (Python):


s = input().rstrip()
week = ["MON","TUE","WED","THU","FRI","SAT","SUN",]

if s == "SUN":
    print(7)
else:
    print(abs(week.index("SUN")-week.index(s)))

Solution (Python):
s = str(input())
if s == 'SUN':
    print(7)
elif s =='MON':
    print(6)
elif s == 'TUE':
    print(5)
elif s ==  'WED':
    print(4)
elif s ==  'THU':
    print(3)
elif s ==  'FRI':
    print(2)
else:
    print(1)

Solution (Python):
s = input()
if s == "SUN":
	print(7)
elif s == "MON":
	print(6)
elif s == "TUE":
	print(5)
elif s == "WED":
	print(4)
elif s == "THU":
	print(3)
elif s == "FRI":
	print(2)
elif s == "SAT":
	print(1)

Solution (Python):
week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]


def main(s: str):
    print(7 - week.index(s))


if __name__ == "__main__":
    s = input()

    main(s)

Solution (Python):
S = input()

ans = {'SUN': 7, 'SAT': 1, 'FRI': 2, 'THU': 3, 'WED': 4, 'TUE': 5, 'MON': 6}
print(ans[S])

Solution (Python):
s = input()

l = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

print(7 - l.index(s))

Solution (Python):
a = input()
if a == "SUN":
  print(7)
elif a == "MON":
    print(6)
elif a == "TUE":
    print(5)
elif a == "WED":
    print(4)
elif a == "THU":
    print(3)
elif a == "FRI":
    print(2)
else:
    print(1)

Solution (Python):
s=input()
a=["SAT","FRI","THU","WED","TUE","MON","SUN"]
print(a.index(s)+1)

Solution (Python):
s=input()
datelist = ["SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"]
for i in range(0,7):
    if s==datelist[i]:
        print(i+1)

Solution (Python):
S = input()

week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
idx = week.index(S)
result = 7 - idx

print(result)

Solution (Python):
s = input()
day = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
for i, d in enumerate(day):
    if s == d:
        print(int(7-i))

Solution (Python):
s = input()

day = {'SUN':7
       ,'MON':6
       ,'TUE':5
       ,'WED':4
       ,'THU':3
       ,'FRI':2
       ,'SAT':1
       }

print(day[s])

Solution (Python):
s = input()
days = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-days.index(s))

Solution (Python):
S=input()
Day={"SUN":"7","MON":"6","TUE":"5","WED":"4","THU":"3","FRI":"2",
    "SAT":"1"}
print(Day[S])

Solution (Python):
S = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(S[input()])

Solution (Python):

r = str(input())

wkdy = ["-1" , "SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"]

for i in range(1, len(wkdy)):
    if wkdy[i] == r:
        print(i)
        break

Solution (Python):
S = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
day = input()

print(len(S) - S.index(day))

Solution (Python):
s = input()
daysofweek = ['SUN','MON','TUE','WED','THU','FRI','SAT']

for i, j in enumerate(daysofweek[::-1]):
    if s==j:
        print(i+1)

Solution (Python):
s = input() 
 
dict = {'SUN': 7, 'MON':6, 'TUE':5, 'WED':4,'THU':3,'FRI':2,'SAT':1} 

print(dict[s])

Solution (Python):
print({"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}[input()])

Solution (Python):

youbi = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

num=0
Nnew = input()

for i in range(len(youbi)):
    if Nnew == youbi[i]:
        break

while 1:
    num = num + 1
    i = i+1
    if i>6:
        i=0
    if youbi[i] == "SUN":
        break
print (num)

Solution (Python):
a = raw_input()

if a == "SUN":
  r = 7
if a == "MON":
  r = 6
if a == "TUE":
  r = 5
if a == "WED":
  r = 4
if a == "THU":
  r = 3
if a == "FRI":
  r = 2
if a == "SAT":
  r = 1
print(r)

Solution (Python):
def resolve():
    S = input()

    if S == "SUN":
        ans=7
    elif S == "MON":
        ans=6
    elif S == "TUE":
        ans=5
    elif S == "WED":
        ans=4
    elif S == "THU":
        ans=3
    elif S == "FRI":
        ans=2
    elif S == "SAT":
        ans=1
    print(ans)
resolve()

Solution (Python):
s=['SUN','MON','TUE','WED','THU','FRI','SAT']
p=input()
for i in range(len(s)):
  if (s[i]==p):
    print(7-i)
    break

Solution (Python):
S = input()

ans = 7

if S == "MON":
    ans = 6
elif S == "TUE":
    ans = 5
elif S == "WED":
    ans = 4
elif S == "THU":
    ans = 3
elif S == "FRI":
    ans = 2
elif S == "SAT":
    ans = 1

print(ans)

Solution (Python):
s = str(input())

l = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}

print(l[s])

Solution (Python):
S = raw_input()

if S == 'SUN':
    print 7
elif S == 'MON':
    print 6
elif S == 'TUE':
    print 5
elif S == 'WED':
    print 4
elif S == 'THU':
    print 3
elif S == 'FRI':
    print 2
elif S == 'SAT':
    print 1

Solution (Python):
n = input()

if n == "SAT":
    print(1)
elif n == "FRI":
    print(2)
elif n == "THU":
    print(3)
elif n == "WED":
    print(4)
elif n == "TUE":
    print(5)
elif n == "MON":
    print(6)
elif n == "SUN":
    print(7)

Solution (Python):
S = input()

mydict = {"SUN":7, "MON":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1} 

O = mydict[S]

print(O)

Solution (Python):
s = input()
week = ['SUN','MON','TUE','WED','THU','FRI','SAT']

for i in range(7):
  if week[i] == s:
    print(7-i)
    break;

Solution (Python):
days = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
day_str = days.index(input())
print(7-day_str)

Solution (Python):
S = input()

date  = ['MON', 'TUE', 'WED', 'THU', 'FRI','SAT','SUN']

if S == date[5]:
    print('1')
elif S == date[4]:
    print('2')
elif S == date[3]:
    print('3')
elif S == date[2]:
    print('4')
elif S == date[1]:
    print('5')
elif S == date[0]:
    print('6')
elif S == date[6]:
    print('7')

Solution (Python):

S = str(input())

if S == 'SAT':
    print(1)
elif S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S=='TUE':
    print(5)
elif S=='WED':
    print(4)
elif S=='THU':
    print(3)
else:
    print(2)

Solution (Python):
N=str(input())

days=['SUN','MON','TUE','WED','THU','FRI','SAT']

for i,day in enumerate(days):
    if N==day:
        print(len(days)-i)

Solution (Python):
day_of_week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
s= input()
index= day_of_week.index(s)
print(7-index)

Solution (Python):
s = str(input())

week = ['SUN','MON','TUE','WED','THU','FRI','SAT' ]

day = 7

for i in range(len(week)):
    if week[i] == s:
        break
    else:
        day -= 1

print(day)

Solution (Python):
print({d: i for i, d in enumerate(["SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"], 1)}[input()])

Solution (Python):
S = input()
if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Solution (Python):
s = input()

master = ['SUN','SAT','FRI','THU','WED','TUE','MON']

count=0
for i in master:
  if s == 'SUN':
    print(7)
    break;
  if i == s:
    print(count)
    break;
  count = 1 + count

Solution (Python):
weekday = str(input())

dic = {'SUN':7, 'MON':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1}
ans = dic[weekday]
print(ans)

Solution (Python):
lis = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = str(input())
print((7-lis.index(s)))

Solution (Python):
s = input()

if s == 'SUN':
    print(7)
elif s == 'SAT':
    print(1)
elif s == 'FRI':
    print(2)
elif s == 'THU':
    print(3)
elif s == 'WED':
    print(4)
elif s == 'TUE':
    print(5)
else:
    print(6)

Solution (Python):
s=input()
d={"SUN":7,"SAT":1,"FRI":2,"THU":3,
  "WED":4,"TUE":5,"MON":6}
print(d[s])

Solution (Python):
s = input()
d = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7 - d.index(s))

Solution (Python):
'''

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C
Code, Compile, Run and Debug online from anywhere in world.

'''
s = str(input(""))
    
if s == "SUN":
    print("7")
elif s == "MON":
    print("6")
elif s == "TUE":
    print("5")
elif s == "WED":
    print("4")
elif s == "THU":
    print("3")
elif s == "FRI":
    print("2")
elif s == "SAT":
    print("1")

Solution (Python):



weekday = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
s = input()
wdn = weekday.index(s)
if wdn == 0:
    res = 7
else:
    res = (7 - wdn) % 7
print(res)

Solution (Python):
n = (input())
day_of_week = {
    'MON':6,
    'TUE':5,
    'WED':4,
    'THU':3,
    'FRI':2,
    'SAT':1,
    'SUN':7
}
print(day_of_week[n])

Solution (Python):

ll = ["SUN" , "MON", "TUE", "WED", "THU", "FRI", "SAT"]
s = input()
print(7-ll.index(s))

Solution (Python):
S = input()

Y = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']

print(7 - Y.index(S))

Solution (Python):
n =input()
l=[0,"MON","TUE","WED","THU","FRI","SAT"]

if n=='SUN':
    print(7)
else:
    print(7-l.index(n))

Solution (Python):
days_next_sunday = {
   'SUN': 7,
   'MON': 6,
   'TUE': 5,
   'WED': 4,
   'THU': 3,
   'FRI': 2,
   'SAT': 1
}
print(days_next_sunday[input()])

Solution (Python):

day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
a = day.index(input())%7
if (a) == 0:
    print(7)
else:
    print(7-a)

Solution (Python):
S = input()
weeddays = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
weeddays.reverse()
index = (weeddays.index(S) + 1) % 8
print(index)

Solution (Python):
S = input()

week = ['SUN','MON','TUE','WED','THU','FRI','SAT']
idx = week.index(S)
print(7 - idx)

Solution (Python):
day_list = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = list(map(str, input().split()))[0]
for i, d in enumerate(day_list):
    if S == d:
        print(7 - i)

Solution (Python):
days = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
today = str(input())

if today in days:
    todayNum = days.index(today)
    remainder = 7 - todayNum
    if remainder == 0:
        remainder = 7
    print(remainder)

Solution (Python):
import sys
sys.setrecursionlimit(1000000)
def solve():
  s = input()
  query = ['SUN','MON','TUE','WED','THU','FRI','SAT']
  print(7-query.index(s))
solve()

Solution (Python):
S = input()

days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']

for i in range(0, 7):
    if S == days[i]:
        print((7 - days.index(S)))

Solution (Python):
S = input()

week = {
    'SUN' : 7,
    'MON' : 6,
    'TUE' : 5,
    'WED' : 4,
    'THU' : 3,
    'FRI' : 2,
    'SAT' : 1
}

print(week[S])

Solution (Python):
s = input()
arr =  ["SUN","MON","TUE","WED","THU","FRI","SAT","SUN"]

for i,t in enumerate(arr):
  if s == t:
    print((7-i))
    break

Solution (Python):
day_of_week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
s= input()
index= day_of_week.index(s)
print(7-index)

Solution (Python):
day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
s = input()
index = day.index(s)
print(7 - index)

Solution (Python):
s = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
c = input()
today = 0
while True:
    if s[today]==c:
        break
    today+=1
print(7-today)

Solution (Python):
S = input()
if S == 'SUN':
  print(7)
elif S == 'MON':
  print(6)
elif S == 'TUE':
  print(5)
elif S == 'WED':
  print(4)
elif S == 'THU':
  print(3)
elif S == 'FRI':
  print(2)
else:
  print(1)

Solution (Python):
S = input()

nextSunday = {'SUN':7, 'MON':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1}

print(nextSunday[S])

Solution (Python):
day_of_week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
s= input()
index= day_of_week.index(s)
print(7-index)

Solution (Python):
import sys

S = input()

lst = ['SUN','MON','TUE','WED','THU','FRI','SAT']

num = lst.index(S)
print(7 - num)

Solution (Python):
S = input()
ans = 0

if S == 'SUN':
    ans = 7
elif S == 'MON':
    ans = 6
elif S == 'TUE':
    ans = 5
elif S == 'WED':
    ans = 4
elif S == 'THU':
    ans = 3
elif S == 'FRI':
    ans = 2
elif S == 'SAT':
    ans = 1

print(ans)

Solution (Python):
def num():
    return int(input())

def nums():
    return list(map(int,input().split(" ")))


date = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(date[input()])

Solution (Python):
a = {'SUN':0, 'MON':1, 'TUE':2, 'WED':3, 'THU':4, 'FRI':5, 'SAT':6}
S = input()
print(7 - a[S])

Solution (Python):
day = input()
if day == 'SUN':
  day = 0
elif day == 'MON':
  day = 1
elif day == 'TUE':
  day = 2
elif day == 'WED':
  day = 3
elif day == 'THU':
  day = 4
elif day == 'FRI':
  day = 5
elif day == 'SAT':
  day = 6
print(7 - day)