N = gets.to_i
S = gets.chomp.split("")

patterns = [true,false].repeated_permutation(S.size).to_a
ans = -1
patterns.each do |pattern|
  temp = ""
  for i in 0..pattern.size-1 do
    temp += S[i] if pattern[i]
  end
  ans += 1 if temp.split("").size == temp.split("").uniq.size
end

puts ans