import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) #alist = list(map(int,input().split())) #alist = [] # n,m = map(int,input().split()) #for i in range(n): # alist.append(list(map(int,input().split()))) s = list(input()) ans = s.count('o') temp = [] no = 0 s.append(['x']) for i in range(n+1): if s[i] != 'x': temp.append(s[i]) continue else: for j in range(1,len(temp)-1): if temp[j-1] == 'o' and temp[j] == '-' and temp[j+1] == 'o': temp[j] = 'o' ans += 1 for j in range(2,len(temp)): if temp[j-2] == 'o' and temp[j-1] == '-' and temp[j] == '-' and m: m -= 1 ans += 2 temp[j-1] == 'o' temp[j] = 'o' for j in reversed(range(len(temp)-2)): if temp[j+2] == 'o' and temp[j+1] == '-' and temp[j] == '-' and m: m -= 1 ans += 2 temp[j+1] == 'o' temp[j] = 'o' no += temp.count('-') temp.clear() print(ans + min(no,m))