def calculate_fuel(mass):
    """Calculate the fuel required for a module

    >>> calculate_fuel(12)
    2
    >>> calculate_fuel(14)
    2
    >>> calculate_fuel(1969)
    654
    >>> calculate_fuel(100756)
    33583
    """

    return mass // 3 - 2