__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = "sonhuytran@gmail.com"
__doc__ = 'http://www.codeabbey.com/index/task_view/fahrenheit-celsius'
__version__ = '1.0'

fahrenheits = [int(word) for word in input().split()]
celsiuses = [str(round((fahrenheit - 32) / 1.8)) for fahrenheit in fahrenheits[1:]]
print(' '.join(celsiuses))
4a76ce1b1220cbbe6463961e0ec29187fbdd0f8a
<mask token>

<mask token>
print(' '.join(celsiuses))

__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = 'sonhuytran@gmail.com'
__doc__ = 'http://www.codeabbey.com/index/task_view/fahrenheit-celsius'
__version__ = '1.0'
fahrenheits = [int(word) for word in input().split()]
celsiuses = [str(round((fahrenheit - 32) / 1.8)) for fahrenheit in
    fahrenheits[1:]]
print(' '.join(celsiuses))

__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = "sonhuytran@gmail.com"
__doc__ = 'http://www.codeabbey.com/index/task_view/fahrenheit-celsius'
__version__ = '1.0'

fahrenheits = [int(word) for word in input().split()]
celsiuses = [str(round((fahrenheit - 32) / 1.8)) for fahrenheit in fahrenheits[1:]]
print(' '.join(celsiuses))