#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
long long n, m;
long long calc(long long div) {
  long long qt = m / div, r = m % div;
  return r * (qt + 1) * (qt + 1) + (div - r) * qt * qt;
}
int main() {
  cin >> n >> m;
  if (!n) {
    cout << -m * m << endl;
    for (int i = 1; i <= m; i++) cout << 'x';
    return 0;
  }
  long long ans = -(1LL << 60), tmp, p = 0;
  for (int i = 0; i <= n - 1; i++) {
    tmp = (n - i) * (n - i) + i - calc(i + 2);
    if (tmp > ans) ans = tmp, p = i;
  }
  cout << ans << endl;
  long long qt = m / (p + 2), r = m % (p + 2);
  for (int i = 0; i <= p + 1; i++) {
    if (i) {
      if (i == 1)
        for (int j = 1; j <= n - p; j++) cout << 'o';
      else
        cout << 'o';
    }
    for (int j = 1; j <= qt + (i < r); j++) cout << 'x';
  }
  return 0;
}
