a=int(input("Welcome to 3by3 determinant solver :\n Enter the first elements in row1:"))
b=int(input("enter the second element in row1: "))
c=int(input("enter the third element in row1: "))
d=int(input("enter the first element in row2: "))
e=int(input("enter the second element in row2: "))
f=int(input("enter the third element in row2: "))
g=int(input("enter the first element in row3: "))
h=int(input("enter the second  element in row3: "))
i=int(input("enter the third element in row3: "))
answer=(a*(e*i-h*f))-(b*(d*i-g*f))+(c*(d*h-e*g))
print(answer)