data = list(map(int, input().split()))

res =data[0]

for idx in range(1,len(data)):
    if data[idx]==0 or data[idx] ==1 or res ==0:
        res+=data[idx]
    else:
        res*=data[idx]
        
print(res)

+ Recent posts