Dolphin loves programming contests. Today, he will take part in a contest in AtCoder.

In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock".

The current time is A o'clock, and a contest will begin in exactly B hours.
When will the contest begin? Answer in 24-hour time.

-----Constraints-----
 - 0 \leq A,B \leq 23
 - A and B are integers.

-----Input-----
The input is given from Standard Input in the following format:
A B

-----Output-----
Print the hour of the starting time of the contest in 24-hour time.

-----Sample Input-----
9 12

-----Sample Output-----
21

In this input, the current time is 9 o'clock, and 12 hours later it will be 21 o'clock in 24-hour time.

Difficulty: introductory

Starter code:

Solutions:
a,b = map(int,input().split())
b += a
if b>23:
    print(b-24)
else:
    print(b)

#
# abc057 a
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """9 12"""
        output = """21"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """19 0"""
        output = """19"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """23 2"""
        output = """1"""
        self.assertIO(input, output)


def resolve():
    A, B = list(map(int, input().split()))
    print(((A+B) % 24))


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

a, b = map(int, input().split())
if a+b >=24:
  print(a+b-24)
else:
  print(a+b)

a,b=map(int,input().split())
print((a+b)%24)

A, B = map(int,input().split())
print((A+B)%24)

# 057_a
A, B = list(map(int, input().split()))

if (0 <= A & A <= 23) & (0 <= B & B <= 23):
    if (A + B) > 24:
        print(((A + B) - 24))
    elif (A + B) == 24:
        print((0))
    else:
        print((A + B))


a, b = map(int, input().split())
print(a+b if a+b<24 else a+b-24)

a, b = map(int, input().split())
print((a+b)%24)

A,B = list(map(int, input().split()))
if A+B < 24:
    print((A+B))
elif A+B >= 24:
    print((A+B-24))


A, B = list(map(int, input().split()))
if A+B<24:
    print((A+B))
else:
    print((A+B-24))


a, b = map(int, input().split())
print((a+b)%24)

A, B = map(int, input().split())
print((A+B)%24)

a,b=map(int,input().split())
if a+b<24:
    print(a+b)
else:
    print(a+b-24)

def iroha():
    a, b = list(map(int, input().split()))

    num = a + b
    if num >= 24:
        new_num = num % 24
        print(new_num)
    else:
        print(num)

def __starting_point():
    iroha()


__starting_point()

# A - Remaining Time

# 現在時刻はA時で、コンテストはB時間後に始まる
# コンテストの開始時刻は、24時間表記で何時か？


A,B = list(map(int,input().split()))

answer = A + B

if answer < 24:
    print(answer)
else:
    print((answer - 24))


a,b=map(int,input().split())
print((a+b)%24)

# 入力
A, B = map(int, input().split())

# 24時間表記に合わせて出力
if A + B > 23:
    print((A + B) % 24)
else:
    print(A + B)

a,b = map(int,input().split())
print((a+b)%24)

a, b = map(int, input().split())
if(a+b < 24):
    print(a+b)
else:
    print(a+b-24)

a,b = map(int,input().split())
print((a+b) % 24)

a, b = list(map(int, input().split()))

print(((a + b) % 24))


a,b=map(int,input().split())
print((a+b)%24)

a,b=map(int,input().split());print((a+b)%24)

a, b = map(int, input().split())

ans = a + b;

if ans >= 24:
    ans = ans - 24

print(ans)

A, B = map(int, input().split())
print((A+B)%24)

a,b = map(int,input().split())

print((a+b) % 24)

A,B = map(int,input().split())

if A + B >= 24:
    print((A + B) - 24)
else:
    print(A + B)

a,b = map(int,input().split())
t = a + b
if t >= 24:
    print(t - 24)
else:
    print(t)

a,b=map(int,input().split());print([a+b,a+b-24][a+b>=24])

A,B = map(int,input().split())
result = A+B if 24 > A+B else A+B-24
print(result)

a, b = map(int, input().split())
print((a+b)%24)

# 入力
A, B = map(int,input().split())

# 処理
start = A + B
if start >= 24:
    print(start - 24)
else:
    print(start)

a, b = map(int, input().split())
print((a + b) % 24)

a,b=map(int,input().split())
print((a+b)%24)

A, B = map(int, input().split())
print((A+B)%24)

a,b=map(int,input().split())
print((a+b)%24)

a, b = map(int, input().split())

print((a + b) % 24)

A,B=map(int,input().split())
print((A+B)%24)

a, b = input().split()

if int(a) + int(b) < 24:
    print(int(a) + int(b))
elif int(a) + int(b) >= 24:
    print(int(a) + int(b) - 24)

a,b = [int(x) for x in input().split()]
print((a+b)%24)

A, B = list(map(int, input().split()))

if A + B <= 23:
    print((A + B))
else:
    print(((A + B) - 24))


a, b = map(int, input().split())
x = a + b
if x < 24:
  print(x)
else:
  print(x - 24)

x,y = map(int,input().split())
print((x+y)%24)

x,y = map(int, input().split())
print((x+y)%24)

print((sum(map(int,input().split()))%24))


a,b=map(int,input().split())
if a+b>23:
  print(a+b-24)
else:
  print(a+b)

# イルカはプログラミングコンテスト好きで、今日はAtCoderのコンテストに参加します。
# 現在時刻は、24時間表記(0:00〜23:59)でA時ちょうどであり、コンテストがちょうどB時間後に始まります。
# コンテストの開始時刻は、24時間表記で何時ちょうどでしょうか?

A,B = map(int,input().split())

if A + B < 24:
    print(A + B)

else:
    print((A + B) - 24)

a,b=map(int,input().split())

if a+b>=24:
    print(a+b-24)
else:
    print(a+b)

a,b=map(int,input().split())
print(a+b if a+b < 24 else a+b-24)

a,b=map(int,input().split())
print((a+b)%24)

'''
abc057 A - Remaining Time
https://atcoder.jp/contests/abc057/tasks/abc057_a
'''

a, b = list(map(int, input().split()))
ans = (a+b)%24
print(ans)


A, B = map(int, input().split())

if A + B >= 24:
    print(A + B - 24)
else:
    print(A + B)

a, b = map(int, input().split())

print((a + b) % 24)


def main():
    a, b = list(map(int, input().split()))
    ans = a + b
    if ans >= 24:
        print((24-ans)*-1)
    else:
        print(ans)



def __starting_point():
    main()
__starting_point()

a,b = map(int,input().split())
ans = (a + b) % 24
print(ans)

a, b = list(map(int, input().split()))
print(((a+b) % 24))


A , B = list(map(int,input().split()))

if (A + B)<24:
    print((A + B))
elif (A + B)>=24:
    print((A + B - 24))


a,b = map(int,input().split())
if a+b >= 24:
    print((a+b)%24)
else:
    print(a+b)

a,b = map(int,input().split())
print(a+b if a+b < 24 else (a+b)%24)

A,B = map(int,input().split())

if A + B < 24:
    print(A + B)
if A + B >= 24:
    print(A + B - 24)

A,B=map(int,input().split())
ans=(A+B)%24
print(ans)

# A - Remaining Time
# https://atcoder.jp/contests/abc057/tasks/abc057_a

A, B = list(map(int, input().split()))

result = A + B
if result >= 24:
    result -= 24

print(result)


a,b=map(int,input().split())
print((a+b)%24)

a,b = list(map(int,input().split()))

print(((a + b) % 24))


a, b = list(map(int, input().split()))
print(((a + b) % 24))


# 各数値の取得
A,B = map(int,input().split())

# 開始時間の計算と出力
start = A + B
if start < 24:
    print(start)
else:
    start = start - 24
    print(start)

A,B=map(int,input().split())
if A+B>=24:
  print(A+B-24)
elif A+B<24:
  print(A+B)

a,b = map(int, input().split())
print((a+b)%24)

# A - Remaining Time 
def main():
    a, b = map(int, input().split())

    if a+b < 24:
        print(a+b)
    else:
        print(a+b-24)
        
def __starting_point():
    main()
__starting_point()

A, B = map(int, input().split())
print((A + B) % 24)

a, b = map(int, input().split())


print((a+b)%24)

A,B = map(int,input().split())
print(A+B-24 if A+B>=24 else A+B)

a,b = map(int,input().split())
print((a+b)%24)

a,b=map(int,input().split(" "))
print((a+b)%24)

# 現在A時、B時間後に始まるコンテストの開始時刻

A, B = map(int, input().split())
start = A + B

if start >= 24:
    print(start - 24)
else:
    print(start)

A, B = map(int, input().split())
print((A + B) % 24)

# イルカはプログラミングコンテスト好きで、今日はAtCoderのコンテストに参加します。
# 現在時刻は、24時間表記(0:00 〜23:59) で A時ちょうどであり、
# コンテストがちょうど B時間後に始まります。
# コンテストの開始時刻は、24時間表記で何時ちょうどでしょうか?

# 制約
# 0 ≦ A, B ≦ 23
# A, B は整数である。

# 標準入力から A時、B時を取得する
hour_a,hour_b = list(map(int,input().split()))

# コンテストの開始時間を計算し出力する
contest_start_hour = 0  # コンテスト開始時間

contest_start_hour = hour_a + hour_b

if contest_start_hour >= 24:    # 日付変わってるよ～
    contest_start_hour -= 24

print(contest_start_hour)


a,b=map(int,input().split())
if a+b >= 24:
    print(a+b-24)
else:
    print(a+b)

A,B = map(int,input().split())
print((A+B) % 24)

a=list(map(int,input().split()))

b=a[0]+a[1]
if b>=24:
  b-=24

print(b)

# 057a

A, B = list(map(int, input().split()))

if A + B > 23:
    print((A + B - 24))
else:
    print((A + B))


A, B = map(int, input().split())

if A + B <= 23:
    print(A + B)
else:
    print((A + B) - 24)

#   AtCoder abc057 a
#   ストレッチ課題

#   入力
a, b = list(map(int, input().split()))

#   処理
if (a + b) >= 24:
    answer = (a + b) - 24
else:
    answer = a + b
print(answer)


a,b = map(int,input().split())
print((a+b)%24)

S_list = list(map(int,input().split()))
ans = S_list[0] + S_list[1]
if  ans <24 :
    result = ans
else:
    result = ans - 24
print(result)


a, b = list(map(int, input().split()))
print(((a + b) % 24))


A,B=map(int,input().split())
print((A+B)%24)

a,b = map(int,input().split())
if a + b < 24:
    print(a + b)
else:
    print(a + b - 24)

import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


def solve():
    a, b = inl()
    return (a + b) % 24


print(solve())


a,b=map(int, input().split())
print((a+b)%24)

a,b=map(int,input().split())
if a+b>=24:
  print(a+b-24)
else:
  print(a+b)

a, b = map(int, input().split())

print((a + b) % 24)

# 入力
A, B = map(int, input().split())

# 出力
if A + B == 24:
    w = 0
elif A + B > 24:
    w = abs(24 - (A + B))
else:
    w = A + B


print(w)

#57
a,b=map(int,input().split())
print(int((a+b)%24))

import sys, math
from itertools import combinations as c, product as p
from collections import deque
sys.setrecursionlimit(10**9)
MOD = 10**9 + 7
#MOD = 998244353


def si(): return input()
def ii(): return int(input())
def fi(): return float(input())
def lstr(): return input().split()
def lint(): return list(map(int, input().split()))
def lint_dec(): return list(map(lambda x:int(x) - 1, input().split()))
def lnstr(n): return [input() for _ in range(n)]
def lnint(n): return [int(input()) for _ in range(n)]
def lint_list(n): return [lint() for _ in range(n)]



############################################################
A, B = lint()
print((A + B) % 24)

a, b = map(int,input().split())
print((a+b) % 24) 

a, b = map(int, input().split())

if a + b < 24:
    print(a + b)
else:
    print(a + b -24)

A, B = list(map(int, input().split()))

if A + B >= 24:
    print((A + B - 24))
else:
    print((A + B))