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 in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using static System.Console;

namespace AtCoder_1
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = Cin();
            switch (n)
            {
                case "SUN":Cout(7);break;
                case "MON":Cout(6);break;
                case "TUE":Cout(5);break;
                case "WED":Cout(4);break;
                case "THU":Cout(3);break;
                case "FRI":Cout(2);break;
                case "SAT":Cout(1);break;
            }
            Cin();
        }
        static int get1(int num)
        {
            if(num < 10)
            {
                return num;
            }
            else
            {
                return num - 10;
            }
        }

        static int get2(int num)
        {
            if(num < 10)
            {
                return num;
            }
            else
            {
                return 1;
            }
        }

        static int loop(int num, int max)
        {
            if (num > max)
            {
                return 0;
            }
            else if (num < 0)
            {
                return max;
            }
            else
            {
                return num;
            }
        }
        static long GCD(long a, long b)
        {
            if (a < b) { swap(ref a, ref b); }
            if (a % b == 0) { return b; }
            else { return GCD(b, a % b); }
        }

        static void swap<T>(ref T a, ref T b)
        {
            T t = a;
            a = b;
            b = t;
        }

        static readonly int MOD10E9 = (1000000000 + 7);
        static bool isInt(double d) { return (int)d == d; }
        static string Cin() { return ReadLine(); }
        static string[] CinAr() { return ReadLine().Split(' '); }
        static int CinT() { return S2i(Cin()); }
        static int[] CinTAr() { return CinAr().Select((x, i) => { return S2i(x); }).ToArray(); }
        static long CinL() { return S2L(Cin()); }
        static long[] CinLAr() { return CinAr().Select((x, i) => { return S2L(x); }).ToArray(); }
        static double CinD() { return S2D(Cin()); }
        static double[] CinDAr() { return CinAr().Select((x, i) => { return S2D(x); }).ToArray(); }
        static int S2i(string s) { return int.Parse(s); }
        static long S2L(string s) { return long.Parse(s); }
        static double S2D(string s) { return double.Parse(s); }
        static void Cout(object s) { WriteLine(s); }
        static long[] yakusuu(long n)
        {
            if (n == 1) { return new long[] { 1 }; }
            List<long> res = new List<long>();
            res.Add(1);
            for (long i = 2; i <= n / 2 + 1; i++)
            {
                if (n % i == 0)
                {
                    res.Add(i);
                }
            }
            res.Add(n);
            return res.ToArray();
        }
        static bool isPrime(long num)
        {
            if (num == 1) { return false; }
            for (long i = 2; i <= Math.Sqrt(num) + 1; i++)
            {
                if (num % i == 0) { return false; }
            }
            return true;
        }

        static void CoutAr<Type>(IEnumerable<Type> types)
        {
            string text = string.Join(" ", types);
            WriteLine(text);
        }

        public static long nCr(int n, int r)
        {
            // naive: return Factorial(n) / (Factorial(r) * Factorial(n - r));
            return nPr(n, r) / Factorial(r);
        }

        public static long nPr(int n, int r)
        {
            // naive: return Factorial(n) / Factorial(n - r);
            return FactorialDivision(n, n - r);
        }

        private static long FactorialDivision(int topFactorial, int divisorFactorial)
        {
            long result = 1;
            for (int i = topFactorial; i > divisorFactorial; i--)
                result *= i;
            return result;
        }

        private static long Factorial(int i)
        {
            if (i <= 1)
                return 1;
            return i * Factorial(i - 1);
        }
    }

    public struct Pair<T>
    {
        public T a;
        public T b;
        public T c;
        public Pair(T _a, T _b) { a = _a; b = _b; c = default(T); }
        public Pair(T _a, T _b, T _c) { a = _a; b = _b; c = _c; }
    }
}