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 = []
  pattern.each_with_index do |p,idx|
    temp.push(S[idx]) if p 
  end
  ans += 1 if temp.size == temp.uniq.size
end

puts ans