Problem:
 Score : 100 points    Problem Statement 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 1 9 12      Sample Output 1 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.       Sample Input 2 19 0      Sample Output 2 19  The contest has just started.       Sample Input 3 23 2      Sample Output 3 1  The contest will begin at 1 o'clock the next day.

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

Solution (Python):
[A,B] = list(map(int, input().split()))
print((A+B)%24)

Solution (Python):
print(eval(input().replace(' ','+'))%24)

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

Solution (Python):
A, B = map(int, input().split())

print((A+B) % 24)

Solution (Python):
A,B = [int(x) for x in input().split()]
print((A+B)%24)

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

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

Solution (Python):

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

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

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

Solution (Python):
print(sum(list(int(i) for i in input().split()))%24)

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

Solution (Python):
a, b = (int(i) for i in input().split())
 
res = a+b
if res > 23:
    print(res-24)
else:
    print(res)

Solution (Python):

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

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

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

Solution (Python):
a,s=map(int,input().split())
print((a+s)%24)

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

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

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

Solution (Python):
def main():
    A, B = map(int, input().split())
    print((A+B) % 24)


if __name__ == "__main__":
    main()

Solution (Python):

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

Solution (Python):
A,B=map(int,input().split(' '))
print(str((A+B)%24))

Solution (Python):
print(sum([int(i) for i in input().split()]) % 24)

Solution (Python):
def main(a, b):
    result = (a + b)%24
    return result

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

Solution (Python):
a,b=(int(x) for x in input().split())
c=a+b
if c>=24:
    print(c-24)
else :
    print(c)

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

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

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

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

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

Solution (Python):
a,b = map(int, input().split())
c = a+b
if c<=23:
  print(c)
elif c>=24:
  print(c-24)

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

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

Solution (Python):
a, b = map(int, input().split())

print((a + b) % 24)

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

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

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

Solution (Python):
N, X = list(map(int, input().split()))
print((N+X)%24)

Solution (Python):
N, X = list(map(int, input().split()))
ans = N + X
if ans > 23:
    ans -= 24
print(ans)

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

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

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

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

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

Solution (Python):
a,b=[int(i) for i in input().split()]
print(a+b if a+b<24 else a+b-24)

Solution (Python):
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
if a+b >= 24:
  print(a+b-24)
else:
  print(a+b)

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

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

Solution (Python):
a, b = map(int, input().split())

print((a+b)%24)

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

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

Solution (Python):
A,B = map(int,input().split())
a = (A+B)%24
print(a)

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

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

Solution (Python):

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

Solution (Python):


""" Remaining Time """



def answer():
    """ A時にB時間足して、24で割った余りが答え """
    A, B = map(int, input().split())
    return (A + B) % 24


def main():
    """ 答えを出力する関数 """
    print(answer())


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):

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

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

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

Solution (Python):
A, B = map(int, input().split())
n = A + B
if n <= 23:
    print(n)    
else:
    print(n - 24)

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

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    A, B = li_input()
    print((A + B) % 24)


main()

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

Solution (Python):
A, B = [ int(x) for x in input().split() ]

ans = (A + B) % 24

print(ans)
print()

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

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

Solution (Python):
a,b = map(int,input().split())
if a+b < 24:
    print(a+b)
elif a+b >= 24:
    print(abs(24-a-b))

Solution (Python):
A,B = map(int,input().split())

ans = (A+B)%24
print(ans)

Solution (Python):
print sum(map(int,raw_input().split()))%24

Solution (Python):
a,b=input().split()
p=int(a)
q=int(b)
print((p+q)%24)

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

Solution (Python):
AB = list(map(int, input().split()))

if AB[0]+AB[1]<24:
    print(AB[0]+AB[1])
else:
    print(AB[0]+AB[1]-24)

Solution (Python):
a=map(int,input().split());print(sum(a)%24)

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

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

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

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

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

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

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

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

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

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

Solution (Python):
N , M = input().split()
N = int(N)
M = int(M)


ans = (N+M) % 24

print(ans)

Solution (Python):
N , M = map(int,input().split())

ans = (N+M) % 24

print(ans)

Solution (Python):
N , M = map(int,input().split())
if N + M >= 24:
  print( N + M - 24)
else:
  print(N+M)

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

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

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

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

Solution (Python):
a,b = map(int,input().split())
c = a+b
while(c > 23):
    c -= 24
print(c)

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

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

Solution (Python):
A, B = map(int, input().split())

print((A + B) if (A + B) < 24 else (A + B - 24))

Solution (Python):
import sys

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

sum = A + B
if sum >= 24:
  sum -=24
  
print sum

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

Solution (Python):
""" AtCoder """

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

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

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

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

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

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

Solution (Python):
print(sum(list(map(int, input().split())))%24)

Solution (Python):
a, b = map(int, input().split())

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

Solution (Python):
A, B = [int(_) for _ in input().split()]

print((A + B) % 24)

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

Solution (Python):
a, b = map(int, input().split())

print((a + b) % 24)

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

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

print((a + b) % 24)

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

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

Solution (Python):
a,b = (int(i) for i in input().split())

print((a+b)%24)

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

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

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

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

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

Solution (Python):
A,B = [int(i) for i in input().split()]
print((A+B) % 24)

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

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

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

Solution (Python):
s = sum([int(x) for x in input().split()])
print(s if s < 24 else s - 24)

Solution (Python):
int_a, int_b = map(int, input().split())

print(int_a + int_b if int_a + int_b < 24 else int_a + int_b - 24)

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

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

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

Solution (Python):

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

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

Solution (Python):
def abc057_a():
    a, b = map(int, input().split())
    print((a + b) % 24)


abc057_a()

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

Solution (Python):
a, b = map(int, input().split())

print((a+b)%24)

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

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

Solution (Python):
A, B = map(int, input().split())

print((A + B) % 24)

Solution (Python):
A, B = (int(x) for x in input().split())
print((A + B) % 24)

Solution (Python):
A, B = (int(x) for x in input().split())
if A + B >= 24:
    print(A + B - 24)
else:
    print(A + B)

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

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

Solution (Python):
A, B = [ int(i) for i in input().split() ]
print((A+B)%24)

Solution (Python):
def main():
    a, b = map(int, input().split())
    print((a + b) % 24)


if __name__ == '__main__':
    main()

Solution (Python):
print(sum(list(map(int, input().split())))%24)

Solution (Python):


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

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

    print(a + b)


if __name__ == '__main__':
    main()

Solution (Python):
a, b = [int(i) for i in input().split()]
print((a + b) % 24)

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

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

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

Solution (Python):
from statistics import mean, median,variance,stdev
import sys
import math

x = input().split()

a = []
for i in range(len(x)):
   a.append(int(x[i]))

print((a[0]+a[1])%24)

Solution (Python):

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

Solution (Python):



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


if __name__ == "__main__":
    main()

Solution (Python):
a,b=map(int,input().split())
c=a+b
print([c-24,c][c<24])

Solution (Python):
x, y = map(int, input().split())
if (x + y) - 24 >= 0:
	print(x + y -24)
else:
	print(x + y)

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

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

Solution (Python):
A, B = [int(_) for _ in input().split()]
print((A+B) % 24)

Solution (Python):
a = sum([int(x) for x in input().split()])
print(a) if a < 24 else print(a-24)

Solution (Python):
n=eval(input().replace(' ','+'))
print([n-24,n][n<24])

Solution (Python):
print(eval(input().replace(' ','+'))%24)

Solution (Python):
a=list(map(int,input().split()))
print(str((a[0]+a[1])%24))

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

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

Solution (Python):




"""
https://beta.atcoder.jp/contests/abc057/tasks/abc57_1
"""

import sys
import math
from inspect import currentframe

def debug(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args), file=sys.stderr)

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

Solution (Python):
A,B = map(int, input().split())

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

Solution (Python):
print(eval(input().replace(' ','+'))%24)

Solution (Python):
A, B = list(map(int, input().rstrip().split()))

h = (A + B) % 24
print(h)

Solution (Python):
A, B = map(int, input().split())
C = (A + B)%24
print(C)

Solution (Python):
a=input().strip().split(" ")

b=[int(i) for i in a]

c=b[0]+b[1]

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

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

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

Solution (Python):
A, B = map(int, input().split())

print((A + B) % 24)

Solution (Python):
a = list(map(int,input().split()))
print((a[0] + a[1] )% 24)

Solution (Python):
A, B = map(int, raw_input().split())
print (A + B) % 24

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

Solution (Python):
a, b = map(int, input().split())
t = a+b
if (t>=0)and(t<=23):
    print(t)
else:
    while t > 23:
        t -= 24
    print(t)

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

Solution (Python):
a = input().split(" ")
if int(a[0]) + int(a[1]) >= 24:
  print(int(a[0]) + int(a[1]) - 24)
else:
  print(int(a[0]) + int(a[1]))

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

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

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

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

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

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

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

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

Solution (Python):
a,b=input().split()
print((int(a)+int(b))%24)

Solution (Python):


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

Solution (Python):
a, b = (int(i) for i in input().split())

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

elif int(a + b) == 24:
    print(0)

else:
    print(int(a + b))

Solution (Python):
num = list(map(int, input().split()))
a = num[0] + num[1]
print(int(a%24))

Solution (Python):
print(eval("("+input().replace(' ','+')+")%24"))

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

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

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

Solution (Python):
a,b = map(int, input().split())

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
print((A+B)%24 if A+B>=24 else A+B)

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

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

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

Solution (Python):
r = eval(input().replace(" ", "+"))
print([r, r - 24][r >= 24])

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

Solution (Python):
a, b = map(int, input().split())

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

Solution (Python):
a,b = map(int,input().split())

print((a+b) % 24)

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

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

Solution (Python):

print(sum(int(x) for x in input().split()) % 24)

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

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

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

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

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

Solution (Python):
x,y = map(int,input().split())

if x + y <= 23:
    print(x+y)
else:
    print(x+y-24)

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

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

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

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

Solution (Python):
a, b = map(int, input().split())

ans = int((a + b) % 24)

print(ans)

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

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

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

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

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
A, B = map(int, input().split())

print((A+B)%24)

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

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

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

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

Solution (Python):
print(eval(input().replace(' ','+'))%24)

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

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

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

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

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

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

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

Solution (Python):


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

if __name__ == '__main__':
    main()

Solution (Python):
a,b = map(int,input().split())
print([a+b-24,a+b][a+b<24])

Solution (Python):
a,b = (int(_) for _ in input().split())
print((a+b)%24)

Solution (Python):
A,B = map(int,input().split())

if A+B <= 23:
    print(A+B)

else:
    print(A+B-24)

Solution (Python):
a, b = map(int, input().split())

remTime = (a+b) % 24

print(remTime)

Solution (Python):
print sum(map(int, raw_input().split())) % 24

Solution (Python):
print sum(map(int, raw_input().split())) % 24

Solution (Python):
A, B = map(int, input().split())

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

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

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

Solution (Python):

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

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

Solution (Python):
a,b=map(int,input().split())
print(a+b-24*((a+b)//24))

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

Solution (Python):


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

    print((a + b) % 24)

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):
A, B = map(int, input().split())
if A+B < 24:
    print(A+B)
elif A+B == 24:
    print(0)
else:
    print(A+B-24)

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

Solution (Python):
a,b = [int(m) for m in input().split()]
print(a+b if a+b < 24 else a+b -24)

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

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7

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

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

Solution (Python):
a, b = map(int, input().split())

print((a+b)%24)

Solution (Python):

n=[int(i) for i in input().split()]
n[0]+=n[1]
if(n[0]<24):
  print(n[0])
else:
  while(n[0]>=24):
    n[0]-=24
  print(n[0])

Solution (Python):
a, b = map(int, input().split(' '))
print((a + b) % 24)

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

contest_time =  (A + B) % 24
print(contest_time)

Solution (Python):
a,b = map(int, input().split())

print((a+b)%24)

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

print((A+B) % 24)

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

Solution (Python):
A, B = map(int, input().split())

print((A + B) % 24)

Solution (Python):
print sum([int(x) for x in raw_input().split()]) % 24

Solution (Python):
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    result = A + B
    if 24 <= result:
        result -= 24
    print(result)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    A , B = map(int,input().split(" "))
    if A + B < 24:
        print(A + B)
    else:
        print(A + B -24)


if __name__ == '__main__':
    main()

Solution (Python):

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

ans = (A + B) % 24

print(ans)

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

Solution (Python):


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

Solution (Python):
a,b = map(int,input().split())

print((a + b)%24)

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

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

Solution (Python):


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

print((A + B) % 24)

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

Solution (Python):
num=input().split(" ")
a=int(num[0])
b=int(num[1])
if a+b>=24:
	print(a+b-24)
else:
	print(a+b)

Solution (Python):
poop=input().split()
print((int(poop[0])+int(poop[1]))%24)

Solution (Python):
x=input().split()
ans=int(x[0])+int(x[1])
print(int(ans%24))

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

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

Solution (Python):
[a,b]=[int(i) for i in input().split()]
if a+b>=24:
    print(a+b-24)
else:
    print(a+b)

Solution (Python):
a,b=map(int,raw_input().split())
print (a+b)%24

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

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

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

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

Solution (Python):
A,B = (int(i) for i in input().split())

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

print(ans)

Solution (Python):
A,B=map(int,input().split());print((A+B)%24)

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

Solution (Python):
a,b=[int(i) for i in input().split()]
print((a+b)%24)

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

Solution (Python):
a,b = [int(num) for num in input().split()]
print((a+b)%24)

Solution (Python):
a,b = [int(num) for num in input().split()]
print((a+b)%24)

Solution (Python):
A,B=[int(i) for i in input().split()]
print((A+B)%24)

Solution (Python):
A,B = [int(i) for i in input().split()]
if A + B < 24 :
  print(A + B)
elif A + B ==24 :
  print("0")
else :
  print(A + B - 24)

Solution (Python):
A,B=[int(i) for i in input().split()]
if A+B<=23:
    print(A+B)
else:
    print(A+B-24)