from typing import Iterable
from functools import reduce
from operator import ixor


def calculate_checksum(message: Iterable[int]) -> int:
    """
    Calculates the checksum, which is the XOR of all bytes in the message
    """
    return reduce(ixor, message)