using System.Collections.Generic; using System; public class Hello { static void Main() { var n = int.Parse(Console.ReadLine().Trim()); var s = Console.ReadLine().Trim(); getAns(n, s); } static void getAns(int n, string s) { var hs = new HashSet(); var t = s.ToCharArray(); for (int i = 0; i < n - 1; i++) { var w = t[i]; var w2 = t[i + 1]; t[i] = 'B'; t[i + 1] = 'B'; hs.Add(new string(t)); t[i] = w; t[i + 1] = w2; } Console.WriteLine(hs.Count); } }