/*
	JAI JAGANNATH!
*/
//@Author : zanj0

#include<bits/stdc++.h>
using namespace std;

#define int 			long long int

#define ff              first
#define ss              second
#define pb              push_back
#define MOD             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(x)            int x; cin>>x; while(x--)
#define endl       		"\n"
#define timetaken cerr<<"Time : "<<1000*(long double)clock()/(long double)CLOCKS_PER_SEC<<"ms\n"

void zanj0()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifdef LOCAL
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
int nCr(int n, int r) {
	int ret = 1;
	for (int i = 1; i <= r; i++) {
		ret = ret  * (n - i + 1);
		ret /= i;
	}
	return ret;
}
void solve() {
	int a, b, k;
	cin >> a >> b >> k;
	string ret = "";
	int n = a + b;
	for (int i = 0; i < n; i++) {
		int posAfter = n - 1 - i;
		int notPutA = nCr(posAfter, b);
		if (notPutA < k) {
			k -= notPutA;
			ret += 'b';
			b--;
		} else {
			ret += 'a';
			a--;
		}

	}
	cout << ret << endl;
}
int32_t main()
{
	zanj0();
	solve();
	timetaken;
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
using ll = long long; 
using ull = unsigned long long;
using vi = vector<int>; 
using vll = vector<long long>; 
using vb = vector<bool>;
using vd = vector<double>;
using vc = vector<char>;
using vvi = vector<vector<int>>; 
using vvll = vector<vector<long long>>;
using vvc = vector<vector<char>>;
using pii = pair<int,int>; 
using pll = pair<ll,ll>;
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
template<typename T> using graph = vector<vector<pair<T, int>>>;// pair of weight and vertex
template<typename T> inline bool chmax(T& a, const T b){if(a < b){ a = b; return true; } return false; }
template<typename T> inline bool chmin(T& a, const T b){if(a > b){ a = b; return true; } return false; }
void my_answer(){

   int n;
   cin >> n;
   
   vi a(n);
   ll rem[200] = {0};

   for(auto& x: a){
       cin >> x;
       ++rem[x % 200];
   }
   
   ll ans = 0;
   for(int i = 0; i < 200; ++i){
       if(rem[i] == 0) continue;
       ans += (rem[i]*(rem[i]-1LL))/2LL;
   }

   cout << ans << endl;

}
void best_answer(){
   
}
int main(){

    my_answer();
    // best_answer();
}
