# homework
# #Q 1420
# n = int(input())
# namelist=[]
# numberlist=[]
# orderednumbers=[]
#
# for i in range(1, n+1):
# name, number = input().split()
# name=str(name)
# number = int(number)
# namelist.append(name)
# numberlist.append(number)
# orderednumbers.append(number)
#
# orderednumbers.sort(reverse=True)
# thirdnumber=numberlist.index(orderednumbers[2])
# thirdname=namelist[thirdnumber]
# print(thirdname)
#
# Q1440
# n = int(input())
# allnumbers = list(map(int, input().split()))
#
# for i in range(n):
# a = allnumbers[i]
# print(i + 1, ": ", end='')
# for j in range(n):
# b = allnumbers[j]
# if a > b:
# print(">", end=' ')
# elif a < b:
# print("<", end=' ')
# elif a == b:
# print("=", end=' ')
# print()
#
# daywork
#
# Q4011 first ver
# firsthalf, secondhalf = list(input().split('-')) # not integer = counted as words list
# year = firsthalf[0:2] # list[n:m] = list content from (n to m-1)
# month = firsthalf[2:4]
# day = firsthalf[4:6]
# gender = secondhalf[0]
# if gender == '1': # because list is words (not integer), use 'number' to find.
# print("19", year, "/", month, "/", day, " M", sep='')
# elif gender == '2':
# print("19", year, "/", month, "/", day, " F", sep='')
# elif gender == '3':
# print("20", year, "/", month, "/", day, " M", sep='')
# elif gender == '4':
# print("20", year, "/", month, "/", day, " F", sep='')
#
# Q 4011 second ver (teacher-written, uses map and integer instead of treating as words list)
# first, second = map(int, input().split('-'))
# year = first // 10000
# month = first % 10000 // 100
# day = first % 100
# gender = second / 1000000
# if gender == 1:
# print('19', year, '/')
#
# '''
# # x = 123456789
# # print(x//10)
# # print(x%10)
# #
# # print(x//100)
# # print(x%100)
# '''
#
# #Q 4016
# a, b, c = input().split()
# a = int(a)
# b = int(b)
# c = int(c)
# d = 0
# for i in range(1, 100001):
# if (a % i == 0) and (b % i == 0) and (c % i == 0):
# d = i
#
# print(d)
#
# # Q 4021
# numbers = list(map(int, input().split()))
# z = 0
# for i in range(7):
# if numbers[i]%2 == 1:
# z += numbers[i]
# if z != 0:
# print(z)
# else:
# print('-1')
#
# # Q4026
# numbers = list(map(int, input().split()))
# numbers.sort()
# a = len(numbers)
# if a%2 == 1:
# print(numbers[a//2])
# else:
# half = (numbers[(a//2)] - numbers[(a//2)-1]) // 2
# print((numbers[(a//2)-1]) + half)
#
# # Q 4711
# people = 0
# howMany = []
# for i in range(4):
# off, on = map(int, input().split())
# people -= off
# people += on
# howMany.append(people)
# howMany.sort()
# print(howMany[3])
#
# # Q 4716
# people = 0
# howMany = []
# for i in range(9):
# off, on = map(int, input().split())
# people -= off
# people += on
# howMany.append(people)
# howMany.sort()
# print(howMany[8])
#
# dish = list(input())
# height = 10
# for i in range(len(dish)-1):
# if dish[i-1] == '(':
# if dish[i] == '(':
# height += 5
# elif dish[i] == ')':
# height += 10
# elif dish[i-1] == ')':
# if dish[i] == ')':
# height += 5
# elif dish[i] == '(':
# height += 10
# print(height)
# print(height)
#
dish = list(input())
height = 10
for i in range(len(dish)-1):
if dish[i] == '(':
if dish[i+1] == '(':
height += 5
elif dish[i+1] == ')':
height += 10
elif dish[i] == ')':
if dish[i+1] == ')':
height += 5
elif dish[i+1] == '(':
height += 10
print(height)