import math
def atoi(x=0) -> int:
if isinstance(x, int):
return x
if isinstance(x, float):
return math.floor(x)
if isinstance(x, bytes):
x = x.decode()
if isinstance(x, str):
num = 0
bit = 1
symbol = -1 if x[0] == "-" else 1
x = x[1:] if x[0] in "+-" else x
set1 = set(x)
set2 = set("1234567890")
if not set1.issubset(set2):
raise ValueError
for i in x[::-1]:
if i == "0":
pass
elif i == "1":
num += 1 * bit * symbol
elif i == "2":
num += 2 * bit * symbol
elif i == "3":
num += 3 * bit * symbol
elif i == "4":
num += 4 * bit * symbol
elif i == "5":
num += 5 * bit * symbol
elif i == "6":
num += 6 * bit * symbol
elif i == "7":
num += 7 * bit * symbol
elif i == "8":
num += 8 * bit * symbol
elif i == "9":
num += 9 * bit * symbol
bit *= 10
return num
raise ValueError
a = atoi(a)
print(a * 3)