
def Main(a, b, c, d):
    """
    :param a: an integer
    :param b: an integer
    :param c: an integer
    :param d: an integer
    :return: (a * 2) + (b + 1) + (c / 2) + (d - 1)
    :rtype: int
    """
    
    a2 = a * 2

    b2 = b + 1

    c2 = c / 2

    d2 = d - 1

    return a2 + b2 + c2 + d2
