n, *bc = map(int, open(0).read().split())     
a = [bc.pop(0) for _ in range(n)]             
q = bc.pop(0)                                 
                                              
d = {}                                        
for x in a:                                   
    if x in d:                                
        d[x] += 1                             
    else:                                     
        d[x] = 1                              
ret = sum(a)                                  