def power_level(x, y, serial_number, increment=False):
    """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."""
    if increment:
        # for zero-based numbering (such as with numpy), we need to increase
        # both coordinates by 1 to get the right result
        x += 1
        y += 1
    rack_id = x + 10
    power_level = rack_id * y
    power_level += serial_number
    power_level *= rack_id
    hundreds_digit = int(power_level / 100) % 10
    if power_level < 0:
        # get it back to negative
        hundreds_digit -= 10
    hundreds_digit -= 5
    return hundreds_digit