from sys import stdin

from itertools import combinations

from math import factorial

import numpy as np

import math



n = int(stdin.readline().rstrip())



print((24-n+24))
n = int(eval(input()))



print((24+24-n))
from sys import stdin
from itertools import combinations
from math import factorial
import numpy as np
import math

n = int(stdin.readline().rstrip())
print((24 - n + 24))

n = int(eval(input()))
print((24 + 24 - n))

-from sys import stdin -from itertools import combinations -from math import factorial -import numpy as np -import math - -n = int(stdin.readline().rstrip()) -print((24 - n + 24)) +n = int(eval(input())) +print((24 + 24 - n))