#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long a, b, maxi, maxj;
  long long maxr = 0;
  string s;
  cin >> a >> b;
  unsigned long long n = min(a, b);
  int aa = min(a, n + 1);
  int bb = min(b, n + 1);
  if (a == 0) {
    s.assign(b, 'x');
    maxr = -b * b;
  } else if (b == 0) {
    s.assign(a, 'o');
    maxr = a * a;
  } else {
    for (int i = 1; i <= aa; ++i) {
      for (int j = max(1, i - 1); j <= min(i + 1, bb); ++j) {
        long long r = (a - i + 1) * (a - i + 1) + i - 1;
        unsigned long long d = b / j;
        unsigned long long m = b % j;
        r -= ((d + 1) * (d + 1) * m + d * d * (j - m));
        if (maxr == 0 || maxr < r) {
          maxr = r;
          maxi = i;
          maxj = j;
        }
      }
    }
    s.assign(a, 'o');
    int pos = maxi > maxj ? a - maxi + 1 : 0;
    int j = 1;
    int m = b % maxj;
    while (j <= maxj) {
      int ocount = j <= m ? b / maxj + 1 : b / maxj;
      s.insert(pos, string(ocount, 'x'));
      if (pos) {
        pos += (ocount + 1);
      } else {
        pos += (a - maxi + 1 + ocount);
      }
      ++j;
    }
  }
  cout << maxr << endl;
  cout << s << endl;
  return 0;
}
