#!/usr/bin/env python

import sys

if len(sys.argv) == 1:
	f = sys.stdin
elif len(sys.argv) == 2:
	f = file(sys.argv[1])
else:	
	sys.exit("Usage: " + sys.argv[0].rsplit("/")[-1] + " [file]")

totalSum = 0

for b in f.read():
	totalSum = totalSum - ord(b)

print hex(totalSum)


