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

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

d3d747bdca7ac646f570c3bfe9fc57cf60ee0de6
<mask token>

<mask token>
sys.setrecursionlimit(10 ** 6)
<mask token>
print((a + b) % 24)

<mask token>
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
a, b = map(int, input().split())
print((a + b) % 24)

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
a, b = map(int, input().split())
print((a + b) % 24)

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

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