#include <bits/stdc++.h>
using namespace std;
int MAX = 1000000009;
int comparedec(int a, int b) {
  if (a > b) {
    return 1;
  }
  return 0;
}
int compareinc(int a, int b) {
  if (a < b) {
    return 1;
  }
  return 0;
}
int main() {
  int i, j;
  long long int a, b;
  cin >> a >> b;
  string ret = "";
  if (a == 0) {
    cout << (-1) * b * b << endl;
    for (i = 0; i < b; i++) {
      ret.append(1u, 'x');
    }
  } else if (b == 0) {
    cout << a * a << endl;
    for (i = 0; i < a; i++) {
      ret.append(1u, 'o');
    }
  } else {
    long long int ans = (a * a) - (b * b);
    long long int diva = 1;
    long long int divb = 1;
    long long int p = 2;
    while (1) {
      long long int eleb = b / p;
      long long int rem = b % p;
      if (eleb <= 0) {
        break;
      }
      long long int elea = a / (p - 1);
      if (elea <= 0) {
        break;
      }
      long long int k = p - 2 + (a - p + 2) * (a - p + 2);
      long long int l = rem * (eleb + 1) * (eleb + 1) + (p - rem) * eleb * eleb;
      if (k - l > ans) {
        ans = k - l;
        diva = p - 1;
        divb = p;
      }
      p++;
    }
    if (diva == 1 && divb == 1) {
      for (i = 0; i < b; i++) {
        ret.append(1u, 'x');
      }
      for (i = 0; i < a; i++) {
        ret.append(1u, 'o');
      }
    } else {
      int y = 1;
      int eleb = b / divb;
      int rem = b % divb;
      int k = 0, l = 0;
      while (y <= divb) {
        if (y <= rem) {
          k = eleb + 1;
        } else {
          k = eleb;
        }
        if (y == 1) {
          l = a - divb + 2;
        } else {
          l = 1;
        }
        for (i = 0; i < k; i++) {
          ret.append(1u, 'x');
        }
        if (y != divb) {
          for (i = 0; i < l; i++) {
            ret.append(1u, 'o');
          }
        }
        y++;
      }
    }
    cout << ans << endl;
  }
  cout << ret << endl;
  return 0;
}
