#include <bits/stdc++.h>
using namespace std;
long long ans = -1e18, n, m, bl;
int main() {
  scanf("%lld%lld", &n, &m);
  for (int i = 2; i <= min(n + 1, m); i++) {
    long long sml = m / i, big_ct = m - sml * i;
    long long tmp = -big_ct * (sml + 1) * (sml + 1) - (i - big_ct) * sml * sml;
    tmp += i - 2 + (n - i + 2) * (n - i + 2);
    if (ans < tmp) ans = tmp, bl = i;
  }
  if (ans <= n * n - m * m) {
    printf("%lld\n", n * n - m * m);
    for (int i = 1; i <= n; i++) putchar('o');
    for (int i = 1; i <= m; i++) putchar('x');
    return 0;
  }
  printf("%lld\n", ans);
  long long sml = m / bl, big_ct = m - sml * bl;
  for (int i = 1; i <= big_ct; i++) {
    for (int j = 1; j <= sml + 1; j++) putchar('x');
    putchar('o');
  }
  for (int i = 1; i <= bl - big_ct - 1; i++) {
    for (int j = 1; j <= sml; j++) putchar('x');
    putchar('o');
  }
  for (int i = bl; i <= n; i++) putchar('o');
  for (int i = 1; i <= sml; i++) putchar('x');
}
