import sys

try:
	usr = open('user_out', 'r', encoding='utf-8')
	inf = open('input', 'r', encoding='utf-8')
except Exception as e:
	print(0)
	print('评测机爆了啊啊啊啊啊啊啊啊啊啊!!!!!!!!!!',file=sys.stderr)
	sys.exit(0)

try:
	n = int(inf.readline())
except Exception as e:
	print(0)
	print('cannot read input: ' + str(e), file = sys.stderr)
	sys.exit(0)

try:
	s = usr.read().strip()
	s = s.replace('\r\n', '\n')
except Exception as e:
	print(0)
	print('cannot read the output: ' + str(e), file =sys.stderr)
	sys.exit(0)

# 1. 长度检查
if len(s) != n:
	print(0)
	print('Length wrong.',file=sys.stderr)
	sys.exit(0)

# 2. 回文检查
t = s[::-1]
if t != s:
	print(0)
	print('string wrong.',file=sys.stderr)
	sys.exit(0)

# 3. 字符出现次数 <=2
cnt = {}
for c in s:
	cnt[c] = cnt.get(c, 0) + 1
	if cnt[c] > 2:
		print(0)
		print('duplicate',file=sys.stderr)
		sys.exit(0)

# 全部正确
print(100)