s = 0 n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) for i in range(n): s += a[i]*b[i] print(s)