def calc(x, y, serial):
    """
    Find the fuel cell's rack ID, which is its X coordinate plus 10.
    Begin with a power level of the rack ID times the Y coordinate.
    Increase the power level by the value of the grid serial number (your puzzle
    input).
    Set the power level to itself multiplied by the rack ID.
    Keep only the hundreds digit of the power level (so 12345 becomes 3; numbers
    with no hundreds digit become 0).
    Subtract 5 from the power level.
    """
    rackId = x + 10
    rackLvl = rackId * y
    temp = (rackLvl + serial) * rackId
    temp = temp // 100 - (temp // 1000 * 10)
    return temp - 5