#include <bits/stdc++.h>
using namespace std;
long long n, m, k, k2;
long long cnt = 0;
long long ans;
long long max1 = -1e15, min2;
int main() {
  cin >> n >> m;
  if (n == 0) {
    cout << -m * m << endl;
    for (int i = 1; i <= m; i++) cout << "x";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    ans = i + (n - i) * (n - i);
    k = m / (i + 2);
    k2 = m % (i + 2);
    ans -= (k + 1) * (k + 1) * (k2) + k * k * (i + 2 - k2);
    if (max1 < ans) {
      max1 = ans;
      min2 = i;
    }
  }
  k = m / (min2 + 2);
  k2 = m % (min2 + 2);
  cout << max1 << endl;
  for (int i = 1; i <= n; i++) {
    if (i <= min2 + 1) {
      for (int j = 1; j <= k; j++) cout << "x";
      if (i <= k2) cout << "x";
      cout << "o";
    } else {
      cout << "o";
    }
  }
  for (int j = 1; j <= k; j++) cout << "x";
}
