def midpoint(imin, imax):
    """Returns middle point

    >>> midpoint(0, 0)
    0

    >>> midpoint(0, 1)
    0

    >>> midpoint(0, 2)
    1

    >>> midpoint(1, 1)
    1

    >>> midpoint(1, 2)
    1

    >>> midpoint(1, 5)
    3

    """

    middle_point = (int(imin) + int(imax)) / 2
    return middle_point