N = int(input())
a = np.empty(N)
for i in range(N):
        a[i] = int(input())


S2 = S.split("#")[1:]
if S2 == S:
        print("0")
else:
    sn = S2.count(".")
    sn2 = S.count("#")
    print(min(sn,sn2))