import sys
from hashlib import sha256

input_data = sys.argv[1]

# Hash input and store it as string
hashed_string = sha256(bytes(input_data, encoding='utf8')).hexdigest()

final_string = ""

# Iterate over hash and take out all chars that are a number
for character in hashed_string:
    if character.isdigit():
        final_string += character

final_int = int(final_string)

# Print number mod 256 to get a number between 0 and 255 for ip adress
print(final_int % 256)
