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

patterns = [true,false].repeated_permutation(S.size).to_a

strs = []
ans = -1
patterns.each do |pattern|
  temp = []
  for i in 0..pattern.size-1 do
    temp.push(S[i]) if pattern[i] 
  end
  ans += 1 if temp.size == temp.uniq.size
end

puts ans