#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <deque>
#include <set>
#include <limits>
#include <string>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <numeric>

using namespace std;

using ll = long long;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)

/* input & output */
#define IN(a) cin >> a
#define OUT(a) cout << a << endl
#define OUT_PREC(a, n) cout << fixed << setprecision(n) << a << endl

/* vector */
#define VEC(t, v, n, ini) vector<t> v(n, ini)
#define VEC2(t, v, m, n, ini) vector<vector<t>> v(m, vector<t>(n, ini))
#define VEC3(t, v, k, m, n, ini) vector<vector<vector<t>>> v(k, vector<vector<t>>(m, vector<t>(n, ini)))

/* bit */
#define IS_TRUE(bit, i) (bit & (1 << i))    // bitのi成分
#define FLAG_ON(bit, i) (bit｜(1 << i))     // bitのi成分をtrueに
#define FLAG_OFF(bit, i) (bit & ~(1 << i))  // bitのi成分をfalseに
#define ALL_TRUE(n) (1 << n)                // 2^n
#define CMPSET(bit, s) (bit ^ s)              // sのbitに対する補集合
#define INCLUDES(a, b) ((a & b) == b)       // aはbを含むか

void solve()
{
    double a, b, w;
    cin >> a >> b >> w;
    w *= 1000;

    int min = (int)ceil(w / b);
    int max = (int)floor(w / a);
    if (max < min){
        cout << "UNSATISFIABLE" << endl;
        return;
    }

    cout << min << " " << max << endl;
    return;
    
}

int main()
{
    /* solve */
    solve();
    system("pause");
}
#include <iostream>
#include <map>
#include <list>
#include <set>
#include <algorithm>
#include <vector>
#include <sstream>
#include <string>
#include <functional>
#include <queue>
#include <deque>
#include <stack>
#include <limits>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <fstream>
#include <iterator>
#include <random>
#include <chrono>


#define forr(i,start,count) for (int i = (start); i < (start)+(count); ++i)
#define set_map_includes(set, elt) (set.find((elt)) != set.end())
#define readint(i) int i; cin >> i
#define readll(i) ll i; cin >> i
#define readdouble(i) double i; cin >> i
#define readstring(s) string s; cin >> s

typedef long long ll;

using namespace std;

ll modd = 1000 * 1000 * 1000 + 7;


int main()   {

      ios_base::sync_with_stdio(false);

      cout.precision(17);
      mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
      uniform_int_distribution<int> rand_gen(0, modd);   // rand_gen(rng) gets the rand no

//      auto start = chrono::steady_clock::now(); 


//    readint(test_cases);
    int test_cases = 1;
    forr(t, 1, test_cases) {
        readint(n); readstring(s);
        map<char,int> dict{{'A', 0}, {'T', 1}, {'C', 2}, {'G', 3}};
        vector<vector<int>> freq(4, vector<int>(1, 0));
        for(char c : s) {
            for(auto x : dict) {
                freq[x.second].push_back(freq[x.second].back() + (x.first==c));
            }
        }

        int ret = 0;
        forr(i,0,n) {
            for(int j = i + 1; j <= n; ++j) {
                map<char,int> cand;
                for(auto x : dict) {
                    cand[x.first] = freq[x.second][j] - freq[x.second][i];
                }
                ret += ((cand['A']==cand['T']) && (cand['C']==cand['G']));
            }
        }

        cout << ret << endl;

    }
    return 0;
}

//        auto stop = chrono::steady_clock::now(); 
//        auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start);
//        cout << "Duration: " << duration.count() << endl;
