#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 28;
const int mod = (int)1e9 + 7;
const double eps = 1e-8;
long long n, m, k;
int main() {
  long long ans = 0;
  cin >> n >> m;
  ans = n * n - m * m;
  int block = 1;
  for (int i = 2; i <= m; i++) {
    if (i - 1 > n) break;
    long long t1 = m % i, t2 = i - t1;
    long long tmp = t2 * (m / i) * (m / i) + t1 * (m / i + 1) * (m / i + 1);
    tmp = (n - i + 2) * (n - i + 2) + (i - 2) - tmp;
    if (tmp > ans) {
      block = i;
      ans = tmp;
    }
  }
  cout << ans << endl;
  if (block == 1) {
    for (int i = 0; i < n; i++) putchar('o');
    for (int i = 0; i < m; i++) putchar('x');
    return puts("");
  }
  long long t1 = m % block, t2 = block - t1;
  for (int i = 0; i < block; i++) {
    if (i < t1) {
      for (int j = 0; j < m / block + 1; j++) putchar('x');
    } else {
      for (int j = 0; j < m / block; j++) putchar('x');
    }
    if (i + 1 < block) {
      if (i == 0) {
        for (int j = 0; j < n - block + 2; j++) putchar('o');
      } else
        putchar('o');
    }
  }
  cout << endl;
  return 0;
}
