#include <bits/stdc++.h>
using namespace std;
void open() {
  freopen("D:/Code/in.txt", "r", stdin);
  freopen("D:/Code/out.txt", "w", stdout);
}
int main(void) {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  long long ret;
  if (n == 0) {
    printf("%I64d\n", 1LL * m * -m);
    for (int i = 0; i < m; i++) printf("x");
  } else if (m == 0) {
    printf("%I64d\n", 1LL * n * n);
    for (int i = 0; i < n; i++) printf("o");
  } else {
    long long maxi = -1000000000000000000LL;
    long long idx = -1;
    for (int i = 1; i <= n; i++) {
      long long o = 1LL * i * i + n - i;
      int bagian = m / (n - i + 2);
      int lebih = m % (n - i + 2);
      int glebih = n - i + 2 - lebih;
      long long x = 1LL * bagian * bagian * glebih +
                    1LL * (bagian + 1) * (bagian + 1) * lebih;
      if (maxi < o - x) {
        maxi = o - x;
        idx = i;
      }
    }
    printf("%I64d\n", maxi);
    int bagian = m / (n - idx + 2);
    int lebih = m % (n - idx + 2);
    int glebih = n - idx + 2 - lebih;
    for (int i = 0; i < n - idx + 2; i++) {
      if (lebih) {
        for (int j = 0; j < bagian + 1; j++) printf("x");
        lebih--;
      } else
        for (int j = 0; j < bagian; j++) printf("x");
      if (i == 0)
        for (int j = 0; j < idx; j++) printf("o");
      else if (i < n - idx + 1)
        printf("o");
    }
  }
  return 0;
}
