# sys.stdin.readline()
import sys
input = sys.stdin.readline

print(48-int(input()))

89d9e56bb2af5de413cef7e828701ccd96213796
<mask token>

<mask token>
print(48 - int(input()))

<mask token>
input = sys.stdin.readline
print(48 - int(input()))

import sys
input = sys.stdin.readline
print(48 - int(input()))

# sys.stdin.readline()
import sys
input = sys.stdin.readline

print(48-int(input()))
