You have to determine the number of hours remaining until New Year's at a given time on December 30th. The input is the time in 24-hour notation, and the output is the number of hours remaining. The time is an integer between 1 and 23.

# Buggy version:
# 指定時刻の取得
M = int(input())

# 12/30の残り時間と12/31の24時間を加算し結果を出力
total =  M + 24
print(total)

# Fixed version:
# 指定時刻の取得
M = int(input())
 
# 12/30の残り時間と12/31の24時間を加算し結果を出力
total =  (24 - M) + 24
print(total)

# Buggy version:
def ii(): return int(sys.stdin.readline())

M = ii()

print(48-M)

# Fixed version:
import sys
def ii(): return int(sys.stdin.readline())

M = ii()

print(48-M)

# Buggy version:
import sys
import math
import bisect

def main():
	n = int(input())
    print(48 - n)

if __name__ == "__main__":
    main()


# Fixed version:
import sys
import math
import bisect
 
def main():
    n = int(input())
    print(48 - n)
 
if __name__ == "__main__":
    main()

# Buggy version:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


m = int(input)
print(24+(24-m)s)


# Fixed version:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


m = int(input())
print(24+(24-m))

# Buggy version:
print(48-i)
i=int(input())

# Fixed version:
i = int(input())
print(48-i)

# Buggy version:
n=int(input)
print(48-n)

# Fixed version:
n=int(input())
print(48 - n)

# Buggy version:
a=int(input())
b=24-a
print(a)

# Fixed version:
a=int(input())
b=24-a
a=b+24
print(a)

# Buggy version:
a = input()
b = 24 - a
c = 24 + b  
print(c)

# Fixed version:
a=int(input())
b=24-a
c=24+b
print(c)

# Buggy version:
h = int(input())

print(24 + (24 - h)


# Fixed version:
h = int(input())

print(24 + (24 - h))

# Buggy version:
#coding: utf-8

a = input()

print(24 - a + 24)

# Fixed version:
#coding: utf-8

a = int(input())

print(24 - a + 24)

# Buggy version:
print(24+24-int(input())

# Fixed version:
print(24+(24-int(input())))

# Buggy version:
# -*- coding: utf-8 -*-

int a=input()

print(48-a)


# Fixed version:
# -*- coding: utf-8 -*-

a=int(input())

s=48-a

print(s)

# Buggy version:
#coding:utf-8
n=int(input())
n-=48
print(n)



# Fixed version:
#coding:utf-8
n=int(input())
n=48-n
print(n)

# Buggy version:
  M = int(input())
    
    print(48-M)

# Fixed version:

M = int(input())

print(48-M)

# Buggy version:
print("{}".format(int(input()) + 24))


# Fixed version:
print("{}".format(24 - int(input()) + 24))

# Buggy version:
N = int(input())
print(48-M)

# Fixed version:
M = input()
N = 48 - int(M)
print(N)

# Buggy version:
# -*- coding: utf-8 -*-
# 整数の入力
a=input()
a=int(a)
b=24-a
print(b)

# Fixed version:
# -*- coding: utf-8 -*-
# 整数の入力
a=input()
a=int(a)
b=24+(24-a)
print(b)

# Buggy version:
print(int(input())-48)

# Fixed version:
print(48-(int(input())))

# Buggy version:
m=int(input())
  print(48-m)

# Fixed version:
m =int(input())
print(48-m)

# Buggy version:
a = int(input)
print(48-a)

# Fixed version:
a=input()
print(48-int(a))

# Buggy version:
# Try AtCoder
# author: Leonardone @ NEETSDKASU

m = int(input())
ans = m + 24
print(ans)

# Fixed version:
# Try AtCoder
# author: Leonardone @ NEETSDKASU
 
m = int(input())
ans = 24 - m + 24
print(ans)

# Buggy version:
a = int(input())
ans = 48 - a
print(a)

# Fixed version:
a = int(input())
ans = 48 - a
print(ans)

# Buggy version:
M = int(input())
print(24 + (M-24))


# Fixed version:
M = int(input())
print(24 + (24-M))

# Buggy version:
temp=input()
b=int(temp)
print(48-temp)


# Fixed version:
temp=input()
b=int(temp)
print(48-b)

# Buggy version:
m = int(input())

print(24-m+24

# Fixed version:
m = int(input())

ans = 24 + 24-m

print(ans)

# Buggy version:
a=int(input())
print(24+(24-a)

# Fixed version:
a = int(input())

print((24-a)+24)

# Buggy version:
m=int(input())
x=24+(24-m)
print(m)


# Fixed version:
x = int(input())
print(24 - x + 24)