#include <bits/stdc++.h>
using namespace std;
int n, m;
long long f[200005], g[200005];
long long ans;
int p, q;
inline long long sqr(long long x) { return 1ll * x * x; }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) f[i] = sqr((long long)(n - i + 1)) + (i - 1);
  f[0] = 0;
  for (int j = 1; j <= m; j++) {
    long long x = (long long)m / j;
    int y = m % j;
    g[j] = 1ll * y * sqr(x + 1) + 1ll * (j - y) * sqr(x);
  }
  ans = -21000000000000ll;
  g[0] = -ans;
  for (int i = 0; i <= n; i++) {
    if (f[i] - g[i] > ans) {
      ans = f[i] - g[i];
      p = i;
      q = i;
    }
    if (i > 1 && f[i] - g[i - 1] > ans) {
      ans = f[i] - g[i - 1];
      p = i;
      q = i - 1;
    }
    if (i < m && f[i] - g[i + 1] > ans) {
      ans = f[i] - g[i + 1];
      p = i;
      q = i + 1;
    }
  }
  printf("%I64d\n", ans);
  int x = m / q, y = m % q;
  if (q == p + 1) {
    q--;
    for (int j = 1; j <= x; j++) printf("x");
    if (y) {
      y--;
      printf("x");
    }
  }
  for (int i = 1; i <= p; i++) {
    if (i < p)
      printf("o");
    else {
      for (int j = 1; j <= n - p + 1; j++) printf("o");
    }
    if (!q) continue;
    q--;
    for (int j = 1; j <= x; j++) printf("x");
    if (y) {
      y--;
      printf("x");
    }
  }
  return 0;
}
