A, B, C = map(int, input().split(' ')) coin_num = A + B total_money = A + 10 * B use_coins = A + B - C if use_coins <= 0: print('impossible') elif use_coins >= A: # the easy one money_list = [(i + (use_coins - i) * 10) for i in range(use_coins) if i <= A and use_coins - i <= B] print(sorted(money_list)[0]) elif use_coins <= A: # B - C > 0 # above 10 money_list = [A - (i + (C - B - i) * 10) for i in range(use_coins) if A - (i + (C - B - i) * 10) > 0 and i <= A and C - B - i >= 0] print(sorted(money_list)[0])