def lev_distance(s1, s2, costs=(1, 1, 2)):
    """
    Levinstein distance with adjustable costs

    :param s1: first string
    :param s2: second string
    :param costs: a tuple of costs: (remove, add, substitute)
    :return: a distance as an integer number
    >>> lev_distance("Obama", "Barack Obama", costs=(1,0,1))
    0
    >>> lev_distance("Obama", "Barack Obama", costs=(0,2,1))
    14
    >>> lev_distance("Obama II", "Barack Obama", costs=(1,0,1))
    3
    >>> lev_distance("Chile", "Tacna", costs=(2,1,2))
    10
    >>> lev_distance("Chile", "Chilito", costs=(2,1,2))
    4
    """

    len1 = len(s1)
    len2 = len(s2)
    a_cost, b_cost, c_cost = costs
    lev = [[0] * (len2+1) for _ in range(len1+1)]
    if a_cost > 0:
        for i, v in enumerate(list(range(0, len1*a_cost+1, a_cost))):
            lev[i][0] = v
    if b_cost > 0:
        lev[0] = list(range(0, len2*b_cost+1, b_cost))
    # iterate over the array
    for i in range(len1):
        for j in range(len2):
            c1 = s1[i]
            c2 = s2[j]
            a = lev[i][j+1] + a_cost  # skip character in s1 -> remove
            b = lev[i+1][j] + b_cost  # skip character in s2 -> add
            c = lev[i][j] + (c_cost if c1 != c2 else 0)  # substitute
            lev[i+1][j+1] = a if a < b and a < c else (b if b < c else c)
    return lev[-1][-1]