#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b;
  scanf("%lld%lld", &a, &b);
  long long int max;
  long long int p;
  string s;
  s = "";
  if (a == 0) {
    for (int i = 0; i < b; i++) {
      s += 'x';
    }
    cout << -b * b << endl;
    cout << s << endl;
    return 0;
  }
  if (b == 0) {
    for (int i = 0; i < a; i++) {
      s += 'o';
    }
    cout << a * a << endl;
    cout << s << endl;
    return 0;
  }
  int max_div = 1;
  max = a * a - (2 - b % (2)) * (b / (2)) * (b / (2)) -
        (b % (2)) * (b / (2) + 1) * (b / (2) + 1);
  for (int i = 2; a / i >= 1 && b / (i + 1) >= 1; i++) {
    p = (a - i + 1) * (a - i + 1) + i - 1 -
        (i + 1 - b % (i + 1)) * (b / (i + 1)) * (b / (i + 1)) -
        (b % (i + 1)) * (b / (i + 1) + 1) * (b / (i + 1) + 1);
    if (max < p) {
      max = p;
      max_div = i;
    }
  }
  bool print_x = true;
  bool print_m_o = true;
  int ab_x = 0;
  while (s.length() != (a + b)) {
    if (print_x) {
      if (ab_x != b % (max_div + 1)) {
        for (int i = 0; i < b / (max_div + 1) + 1; i++) {
          s += 'x';
        }
        ab_x++;
      } else {
        for (int i = 0; i < b / (max_div + 1); i++) {
          s += 'x';
        }
      }
      print_x = false;
    } else {
      if (print_m_o) {
        for (int i = 0; i < a - max_div + 1; i++) {
          s += 'o';
        }
        print_m_o = false;
      } else {
        s += 'o';
      }
      print_x = true;
    }
  }
  cout << max << endl;
  cout << s << endl;
}
