class Solve: def __init__(self): self.N = int(input()) self.L = [int(i) for i in input().split()] self.K = int(input()) self.l, self.r = max([l/self.K for l in self.L]), min(max(self.L)+1, sum(self.L)/self.K+1) def check(self, l): idx, s, k = 0, 0, 0 S = sum(self.L) while(k < self.K): if(S < l*(self.K-k)): return False while(s < l): try: s = self.L[idx] S -= s except IndexError: return False idx += 1 dk = s // l s -= l * dk k += dk return True def solve(self): while self.r - self.l > 10**-9: m = (self.l + self.r) / 2 if self.check(m): self.l = m else: self.r = m return self.l print(Solve().solve())