#include using namespace std; static inline void solution() { int n; cin >> n; string s; cin >> s; set st; for (int i = 0; i < n - 1; i++) { char a = s[i], b = s[i + 1]; s[i] = 'B', s[i + 1] = 'B'; st.insert(s); s[i] = a, s[i + 1] = b; } cout << st.size() << '\n'; } int main() { ios_base::sync_with_stdio(0), cin.tie(0); solution(); return 0; }