#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
long long cal(long long temp) { return temp * temp; }
int main() {
  long long a, b;
  while (cin >> a >> b) {
    if (a == 0) {
      cout << -cal(b) << endl;
      for (int i = 1; i <= b; i++) {
        printf("x");
      }
      puts("");
    } else if (b == 0) {
      cout << cal(a) << endl;
      for (int i = 1; i <= a; i++) {
        printf("o");
      }
      puts("");
    } else {
      long long maxx = -INF;
      long long ave = 0;
      for (long long i = 1; i <= a; i++) {
        long long suma = (i - 1) + cal(a - i + 1);
        long long sumb = (b % (i + 1)) * cal(b / (i + 1) + 1) +
                         (i + 1 - b % (i + 1)) * cal(b / (i + 1));
        long long sum = suma - sumb;
        if (sum > maxx) {
          maxx = sum;
          ave = i;
        }
      }
      cout << maxx << endl;
      long long x = b / (ave + 1);
      long long y = b % (ave + 1);
      for (long long i = 1; i <= ave + 1; i++) {
        if (y) {
          for (long long j = 1; j <= x + 1; j++) {
            printf("x");
          }
          y--;
        } else {
          for (long long j = 1; j <= x; j++) {
            printf("x");
          }
        }
        if (i == ave + 1) {
          break;
        }
        if (i == 1) {
          for (long long j = 1; j <= (a - ave + 1); j++) {
            printf("o");
          }
        } else {
          printf("o");
        }
      }
      puts("");
    }
  }
}
