Problem:
Score : 100 points

Problem Statement

How many hours do we have until New Year at M o'clock (24-hour notation) on 30th, December?

Constraints

1≤M≤23

M is an integer.

Input

Input is given from Standard Input in the following format:

M

Output

If we have x hours until New Year at M o'clock on 30th, December, print x.

Sample Input 1

21

Sample Output 1

27

We have 27 hours until New Year at 21 o'clock on 30th, December.

Sample Input 2

12

Sample Output 2

36

Solution in C# (Mono 4.6.2.0) (judge verdict: Runtime Error)

using System;
using System.Linq;

namespace test
{
    class Program {
        public static void Main(string[] args)
        {
            var str = Console.ReadLine().Split(' ');
            int a, b;
            a = int.Parse(str[0]);
            b = int.Parse(str[1]);
            var target = Console.ReadLine();
            int count = target.Count(x => x == '-');
            if (count != 1) {
                Console.WriteLine("No");
            }
            else {
                int hifun = target.IndexOf('-');
                if (hifun == a && target.Length == a + b + 1) {
                    Console.WriteLine("Yes");
                }
                else {
                    Console.WriteLine("No");
                }
            }
        }
    }
}