/**********************************************
			Author : smiley007
***********************************************/

//Data Structure Includes
#include <vector>
#include <queue>
#include <deque>
#include <bitset>
#include <stack>
#include <list>
#include <set>
#include <map>

//Other Includes
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <cctype>
#include <cassert>
#include <numeric>
#include <algorithm>
#include <ctime>
#include <sstream>
#include <climits>

using namespace std ;

//Defines
#define FOR(i,a,b)         	for(int i = (a); i <  (b) ; i++)
#define FOE(i,a,b)         	for(int i = (a); i <= (b) ; i++)
#define FOED(i,a,b)			for(int i = (a); i >= (b) ; i--)
#define ITR(v,it) 			for( typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define REP(i,n)			FOR(i,0,n)
#define ALL(a) 				a.begin(),a.end()
#define SORT(a) 			sort(ALL(a))
#define SZ(a)				((int)a.size())
#define SQR(x)				((x)*(x))
#define BS(i) 				__builtin_popcount(i)
#define LZ(i)				__clz
#define RE 					return
#define FI 					first
#define SD 					second
#define PB					push_back
#define MP(x,y)				make_pair(x,y)
#define SET(a,v)			memset(&a[0],v, sizeof(a[0])*SZ(a) )
#define POW2(i)				( 1LL << (i) )
//#define SET(a,i)			a |= POW2(i)
#define CLR(a,i)			a &= ~ POW2(i)
#define TOGGLE(a,i)			a ^= POW2(i)
#define TEST(a,i)			((a) & POW2(i))
#define EPS					1e-9
#define INF					1e9
#define PI 					3.141592653589793
#define MOD 				1000000007

//Typedefs
typedef long long ll ;
typedef pair<int,int> pii ;
typedef pair<string,string> pss ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
typedef vector<vi> vvi ;
typedef vector<vl> vvl ;
typedef vector<bool> vb ;
typedef vector<vb> vvb ;
typedef vector<string> vs ;
typedef vector<pii> vpii ;

//Templates
//<< ----- Number Theory --- >>
template<class T> bool isPrime(T x){if(x<=1)RE false;T i;for(i=2;i*i<=x;i++)if(x%i==0)RE false;RE true;} //isPrime
template<class T> class Prime{public:vector<T> z ;Prime(){z.resize(1e5+7);REP(i,SZ(z)) z[i]=1;
z[0]=0;z[1]=0;T j;FOR(i,2,SZ(z)){if(z[i]){j=i+i;while(j<SZ(z)){ z[j]=0;j += i ;} } }} }; //Prime

//<< ----- Geometry -------- >>
template<class T> double dist(T x1,T y1,T x2,T y2){RE sqrt( 1.*(x2-x1)*(x2-x1) + 1.*(y2-y1)*(y2-y1) ) ;} //dist
template<class T> class Point{
    public :
    T x, y;
    Point(){}
    Point(T a,T b):x(a),y(b){}
    bool operator ==(const Point& tmp)const{ RE(x==tmp.x && y==tmp.y);}
    Point operator-(const Point& tmp) const{ RE Point<T> (x-tmp.x,y-tmp.y);}
};

//<<---- Conversions ------- >>
char toLowerCase(char x){RE(x+32);}
char toUpperCase(char x){RE(x-32);}
bool isUpperCase(char x){RE (65<=x && x<=90)? 1 : 0 ;}
bool isLowerCase(char x){RE (97<=x && x<=122)? 1 : 0 ;}
bool isAlpha(char x){RE (isUpperCase(x) || isLowerCase(x))? 1 : 0 ;}
bool isDigit(char x){RE('0'<=x && x<='9')? 1 : 0 ;}
template<class T> T toDec(string s){stringstream is(s);T res;is>>res;RE res;} //toDec
template<class T> string toStr(T n){string s;stringstream is;is<<n;is>>s;RE s;} //toStr

template<class T> void checkmin(T& a,T b){if(a>b)a=b;}
template<class T> void checkmax(T& a,T b){if(a<b)a=b;}

//Code Begins Here ------ >>>

// Grab your asses fella's , because this code is gonna go deep into you :)

int main(){
	#ifdef LocalHost
		freopen("input.txt","r",stdin);
	#endif

	int a,b,i,fst,scnd;
	cin >> a >> b;
	ll ans = 0;
	if (a >= b) {
		fst = b/2;
		scnd = fst + (b%2);
		ans = SQR(a) - SQR(fst) - SQR(scnd);
		cout << ans << "\n";
		for (i = 0; i < fst; i++) cout << "x";
		for (i = 0; i < a; i++) cout << "o";
		for (i = 0; i < scnd; i++) cout << "x";
		cout << "\n";
	}
	else {
		int tot = 0;
		int len = b/(a+1);
		int rem = b - a*len;
		ans  = -a*SQR(len) - SQR(rem) + a;
		cout << ans << "\n";
		int it = a*(len+1);
		while (it--) {
			if (tot < len) {
				cout << "x";
				tot++;
			}
			else {
				cout << "o";
				tot = 0;
			}
		}
		while(rem--) cout << "x";
		cout << "\n";
	}

	#ifdef LocalHost
    cout<<endl<<"Execution time = "<<(float)clock()/CLOCKS_PER_SEC <<" s"<<endl;
	#endif

	RE 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <assert.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#include <functional>
#include <vector>
#include <deque>
#include <utility>
#include <bitset>
#include <limits.h>

using namespace std;
typedef long long ll;
typedef double lf;
typedef long double llf;
typedef unsigned long long llu;

ll sq(ll v) { return v*v; }

int main() {
    ll a, b;
    scanf("%I64d%I64d", &a, &b);

    ll n = min(a, b);

    if(a == 0) {
        printf("%I64d\n", -sq(b));
        for(ll i = 0; i < b; i++) putchar('x');
    }
    else if(b <= 1) {
        printf("%I64d\n", sq(a) - sq(b));
        for(ll i = 0; i < a; i++) putchar('o');
        for(ll i = 0; i < b; i++) putchar('x');
    }
    else {
        ll res = -sq(a + b);
        ll res_w, res_l;
        for(int w = 1; w <= n; w++) {
            for(int l = w-1; l <= w+1; l++) if(1 <= l && l <= b) {
                // w groups winning, l groups losing
                ll positive = sq(a - (w-1)) + (w-1);
                ll negative = sq(b / l + 1) * (b % l) + sq(b / l) * (l - b % l);
                if(res < positive - negative) {
                    res = positive - negative;
                    res_w = w; res_l = l;
                }
            }
        }

        printf("%I64d\n", res);

        if(res_w >= res_l) {
            for(ll i = 0; i < res_w; i++) {
                int wl = (i > 0) ? 1 : a - (res_w-1);
                for(int x = 0; x < wl; x++) putchar('o');
                int ll = (i < b % res_l) ? (b / res_l + 1) : (b / res_l);
                if(i < res_l) for(int x = 0; x < ll; x++) putchar('x');
            }
        }else {
            for(ll i = 0; i < res_l; i++) {
                int ll = (i < b % res_l) ? (b / res_l + 1) : (b / res_l);
                for(int x = 0; x < ll; x++) putchar('x');
                int wl = (i > 0) ? 1 : a - (res_w-1);
                if(i < res_w) for(int x = 0; x < wl; x++) putchar('o');
            }
        }
    }

    return 0;
}


/**********************************************
            Author : smiley007
***********************************************/

//Data Structure Includes
#include <vector>
#include <queue>
#include <deque>
#include <bitset>
#include <stack>
#include <list>
#include <set>
#include <map>

//Other Includes
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <cctype>
#include <cassert>
#include <numeric>
#include <algorithm>
#include <ctime>
#include <sstream>
#include <climits>

using namespace std ;

//Defines
#define FOR(i,a,b)          for(int i = (a); i <  (b) ; i++)
#define FOE(i,a,b)          for(int i = (a); i <= (b) ; i++)
#define FOED(i,a,b)         for(int i = (a); i >= (b) ; i--)
#define ITR(v,it)           for( typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define REP(i,n)            FOR(i,0,n)
#define ALL(a)              a.begin(),a.end()
#define SORT(a)             sort(ALL(a))
#define SZ(a)               ((int)a.size())
#define SQR(x)              (1LL*(x)*(x))
#define BS(i)               __builtin_popcount(i)
#define LZ(i)               __clz
#define RE                  return
#define FI                  first
#define SD                  second
#define PB                  push_back
#define MP(x,y)             make_pair(x,y)
#define SET(a,v)            memset(&a[0],v, sizeof(a[0])*SZ(a) )
#define POW2(i)             ( 1LL << (i) )
//#define SET(a,i)          a |= POW2(i)
#define CLR(a,i)            a &= ~ POW2(i)
#define TOGGLE(a,i)         a ^= POW2(i)
#define TEST(a,i)           ((a) & POW2(i))
#define EPS                 1e-9
#define INF                 1e9
#define PI                  3.141592653589793
#define MOD                 1000000007

//Typedefs
typedef long long ll ;
typedef pair<int,int> pii ;
typedef pair<string,string> pss ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
typedef vector<vi> vvi ;
typedef vector<vl> vvl ;
typedef vector<bool> vb ;
typedef vector<vb> vvb ;
typedef vector<string> vs ;
typedef vector<pii> vpii ;

//Templates
//<< ----- Number Theory --- >>
template<class T> bool isPrime(T x){if(x<=1)RE false;T i;for(i=2;i*i<=x;i++)if(x%i==0)RE false;RE true;} //isPrime
template<class T> class Prime{public:vector<T> z ;Prime(){z.resize(1e5+7);REP(i,SZ(z)) z[i]=1;
z[0]=0;z[1]=0;T j;FOR(i,2,SZ(z)){if(z[i]){j=i+i;while(j<SZ(z)){ z[j]=0;j += i ;} } }} }; //Prime

//<< ----- Geometry -------- >>
template<class T> double dist(T x1,T y1,T x2,T y2){RE sqrt( 1.*(x2-x1)*(x2-x1) + 1.*(y2-y1)*(y2-y1) ) ;} //dist
template<class T> class Point{
    public :
    T x, y;
    Point(){}
    Point(T a,T b):x(a),y(b){}
    bool operator ==(const Point& tmp)const{ RE(x==tmp.x && y==tmp.y);}
    Point operator-(const Point& tmp) const{ RE Point<T> (x-tmp.x,y-tmp.y);}
};

//<<---- Conversions ------- >>
char toLowerCase(char x){RE(x+32);}
char toUpperCase(char x){RE(x-32);}
bool isUpperCase(char x){RE (65<=x && x<=90)? 1 : 0 ;}
bool isLowerCase(char x){RE (97<=x && x<=122)? 1 : 0 ;}
bool isAlpha(char x){RE (isUpperCase(x) || isLowerCase(x))? 1 : 0 ;}
bool isDigit(char x){RE('0'<=x && x<='9')? 1 : 0 ;}
template<class T> T toDec(string s){stringstream is(s);T res;is>>res;RE res;} //toDec
template<class T> string toStr(T n){string s;stringstream is;is<<n;is>>s;RE s;} //toStr

template<class T> void checkmin(T& a,T b){if(a>b)a=b;}
template<class T> void checkmax(T& a,T b){if(a<b)a=b;}

//Code Begins Here ------ >>>

// Grab your asses fella's , because this code is gonna go deep into you :)
ll sq(int x) {
    return 1LL*x*x;
}

int main(){
    #ifdef LocalHost
        freopen("input.txt","r",stdin);
    #endif

    int a,b,i,pos,neg,lol,wl,val;
    ll res;
    cin >> a >> b;
    int n = min(a,b);
    if (!a) {
        cout << -SQR(b) << "\n";
        for (i = 0; i < b; i++) cout << "x";
        cout << "\n";
    }
    else if (!b) {
        cout << SQR(a) << "\n";
        for (i = 0; i < a; i++) cout << "o";
        cout << "\n";
    }

    else {
        wl = lol = 0;
        res = -SQR(a+b);
        for (int ap = 1; ap <= n; ap++) {
            for (int bp = ap; bp <= ap+1; bp++) {
                if (1 <= bp && bp <= b) {
                    pos = SQR(a - (ap-1)) + (ap - 1);
                    neg = SQR((b/bp) + 1)*(b%bp) + SQR(b/bp)*(bp- (b%bp));
                    if (res < (pos-neg) ) {
                        res = pos-neg;
                        wl = ap, lol = bp;
                    }
                }
            }
        }
        cout << res << "\n";
            for (int c = 0; c < lol; c++) {
                val = (c >= (b%lol) ? (b/lol) : (b/lol + 1));
                for (i = 0; i < val; i++) cout << "x";
                int val = (c > 0 ? 1 : (a - (wl-1)));
                if (c < wl) for (i = 0; i < val; i++) cout << "o";
            }
            cout << "\n";
    }

    #ifdef LocalHost
    cout<<endl<<"Execution time = "<<(float)clock()/CLOCKS_PER_SEC <<" s"<<endl;
    #endif

    RE 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;

long long a, b, ans;
string str;

int main()
{
    while (cin >> a >> b) {
        str = "";
        if (a <= b) {
            while (a && b) {
            --a, --b;
            str += "xo";
            }
            ans = 0;
            while (b) --b, ++ans, str += 'x';
            cout << -1 * ans * ans << endl;
            cout << str << endl;
        } else {
            long long b1 = b / 2;
            long long b2 = b - b1;
            ans = a * a - b1 * b1 - b2 * b2;
            while (b1) --b1, str += 'x';
            while (a) --a, str += 'o';
            while (b2) --b2, str += 'x';
            cout << ans << endl;
            cout << str << endl;
        }
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;

long long a, b, ans;
string str;

int main()
{
    while (cin >> a >> b) {
        str = "";
        if (a <= b) {
            while (a && b) {
            --a, --b;
            str += "xo";
            }
            ans = 0;
            while (b) --b, ++ans, str += 'x';
            cout << -1 * ans * ans << endl;
            cout << str << endl;
        } else {
            ans = a * a - b * b;
            while (b) --b, str += 'x';
            while (a) --a, str += 'o';
            cout << ans << endl;
            cout << str << endl;
        }
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;

const int inf = 1LL << 60;
long long a, b, num, ans;

int main()
{
    while (cin >> a >> b) {
        if (a == 0 || b == 0) {
            cout << a * a - b * b << endl;
            while (a) --a, cout << 'o';
            while (b) --b, cout << 'x';
            cout << endl;
            continue;
        }
        ans = a * a - b * b;
        num = 0;
        FOR(i, 1, a) {
            if (i >= b) break;
            long long cnt = b / (i + 1);
            long long mod = b % (i + 1);  //����ķָ�ǰmod��
            long long tmp = (a - (i - 1)) * (a - (i - 1)) + (i - 1) - mod * (cnt + 1) * (cnt + 1) - (i + 1 - mod) * cnt * cnt;
            if (tmp > ans) {
                num = i;
                ans = tmp;
            }
        }
        cout << ans << endl;
        long long cnt = b / (num + 1);
        long long mod = b % (num + 1);
        FOR(i, 1, cnt) cout << 'x';
        if (mod) --mod, cout << 'x';
        FOR(i, 1, num) {
            if (i == 1) FOR(j, 1, a - (num - 1)) cout << 'o';
            else cout << 'o';
            FOR(j, 1, cnt) cout << 'x';
            if (mod) --mod, cout << 'x';
        }
        cout << endl;
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;

const int inf = 1LL << 60;
long long a, b, num, ans;

int main()
{
    while (cin >> a >> b) {
        if (a == 0 || b <= 1) {
            cout << a * a - b * b << endl;
            while (a) --a, cout << 'o';
            while (b) --b, cout << 'x';
            cout << endl;
            continue;
        }
        ans = a * a - b * b;
        num = 0;
        FOR(i, 1, a) {
            if (i >= b) break;
            long long cnt = b / (i + 1);
            long long mod = b % (i + 1);  //����ķָ�ǰmod��
            long long tmp = (a - (i - 1)) * (a - (i - 1)) + (i - 1) - mod * (cnt + 1) * (cnt + 1) - (i + 1 - mod) * cnt * cnt;
            if (tmp > ans) {
                num = i;
                ans = tmp;
            }
        }
        cout << ans << endl;
        long long cnt = b / (num + 1);
        long long mod = b % (num + 1);
        FOR(i, 1, cnt) cout << 'x';
        if (mod) --mod, cout << 'x';
        FOR(i, 1, num) {
            if (i == 1) FOR(j, 1, a - (num - 1)) cout << 'o';
            else cout << 'o';
            FOR(j, 1, cnt) cout << 'x';
            if (mod) --mod, cout << 'x';
        }
        cout << endl;
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;

int a, b, tag;
long long ans;
string str;

int main()
{
    while (cin >> a >> b) {
        str = "";
        if (a <= b) {
            while (a && b) {
            --a, --b;
            str += "xo";
            }
            ans = 0;
            while (b) --b, ++ans, str += 'x';
            cout << -1 * ans * ans << endl;
            cout << str << endl;
        } else {
            ans = a * a - b * b;
            while (b) --b, str += 'x';
            while (a) --a, str += 'o';
            cout << ans << endl;
            cout << str << endl;
        }
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;

long long a, b, ans;
string str;

int main()
{
    while (cin >> a >> b) {
        str = "";
        if (a == 0) {
            ans = - b * b;
            while (b) --b, str += 'x';
            cout << ans << endl;
            cout << str << endl;
            continue;
        }
        str = "";
        long long b1 = b / 2;
        long long b2 = b - b1;
        ans = a * a - b1 * b1 - b2 * b2;
        while (b1) --b1, str += 'x';
        while (a) --a, str += 'o';
        while (b2) --b2, str += 'x';
        cout << ans << endl;
        cout << str << endl;
    }
    return 0;
}


#include <iostream>
#include <string>
using namespace std;

int main()
{
    long long a, b;
    string s;
    cin >> a >> b;
    long long r = 0;
    if (a <= b - 1)
    {
        int i = 0, j = 0;
        int e = b / (a + 1);//ÿ��x����Ŀ����a+1��
        int m = b - e * (a + 1);//�����ʣ��x����Ŀ

        for (; i < m; ++i)
        {
            s += string(e + 1, 'x');
            r -= (e + 1)*(e + 1);
            s.push_back('o');
            r += 1;
        }
        for (; i < a; ++i)
        {
            s += string(e, 'x');
            r -= e * e;
            s.push_back('o');
            r += 1;
        }
        s += string(e, 'x');
        r -= e * e;

    }
    else
    {
        if (b > 0)
        {
            s.append(b - b/2, 'x');
            r -= (b - b/2) * (b - b/2);
        }

        s.append(string(a, 'o'));
        r += a*a;
        if (b > 1)
        {
            s.append(string(b/2, 'x'));
            r -= (b/2)*(b/2);
        }
    }

    cout << r << endl;
    cout << s << endl;

    return 0;
}


//http://codeforces.com/contest/399/problem/C
#include <algorithm>
#include <iostream>
#include <string>
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;
}


#include <iostream>
#include <string>
using namespace std;

int main()
{
    int a, b;
    string s;
    cin >> a >> b;
    long long r = 0;
    if (a <= b - 1)
    {
        int i = 0, j = 0;
        int e = b / (a + 1);//ÿ��x����Ŀ����a+1��
        int m = b - e * (a + 1);//�����ʣ��x����Ŀ

        for (; i < m; ++i)
        {
            s += string(e + 1, 'x');
            r -= (e + 1)*(e + 1);
            s.push_back('o');
            r += 1;
        }
        for (; i < a; ++i)
        {
            s += string(e, 'x');
            r -= e * e;
            s.push_back('o');
            r += 1;
        }
        s += string(e, 'x');
        r -= e * e;

    }
    else
    {
        int i = 0;
        if (b > 0)
        {
            s.push_back('x');
            r -= 1;
        }

        s.append(string(a, 'o'));
        r += a*a;
        if (b > 1)
        {
            s.append(string(b - 1, 'x'));
            r -= (b-1)*(b-1);
        }
    }

    cout << r << endl;
    cout << s << endl;

    return 0;
}


//http://codeforces.com/contest/399/problem/C
#include <algorithm>
#include <iostream>
#include <string>
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;
        while (j <= maxj)
        {
            int m = b%j;
            int ocount = j < m ? b/j + 1: b/j;
            s.insert(pos, string(ocount, 'o'));
            if (pos)
            {
                pos += (ocount + 1);
            }
            else
            {
                pos += (a - maxi + 1 + ocount);
            }
            ++j;
        }
    }

    cout << maxr << endl;
    cout << s << endl;

    return 0;
}


#include <iostream>
#include <string>
using namespace std;

int main()
{
    int a, b;
    string s;
    cin >> a >> b;
    long long r = 0;
    if (a <= b - 1)
    {
        int i = 0, j = 0;
        int e = b / (a + 1);//ÿ��x����Ŀ����a+1��
        int m = b - e * (a + 1);//�����ʣ��x����Ŀ

        for (; i < m; ++i)
        {
            s += string(e + 1, 'x');
            r -= (e + 1)*(e + 1);
            s.push_back('o');
            r += 1;
        }
        for (; i < a; ++i)
        {
            s += string(e, 'x');
            r -= e * e;
            s.push_back('o');
            r += 1;
        }
        s += string(e, 'x');
        r -= e * e;

    }
    else
    {
        int i = 0;
        if (b > 0)
        {
            s.append(b - b/2, 'x');
            r -= (b - b/2) * (b - b/2);
        }

        s.append(string(a, 'o'));
        r += a*a;
        if (b > 1)
        {
            s.append(string(b/2, 'x'));
            r -= (b/2)*(b/2);
        }
    }

    cout << r << endl;
    cout << s << endl;

    return 0;
}


#include <algorithm>
#include<cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include<iterator>
using namespace std;
#define N 400000
#define M 10011
#define INF 1<<30
#define exp (1e-8)
#define mm(a,b) memset((a),b,sizeof(a))
#define PI 3.1415926535898
#define E 2.718281828459
#define LL long long
using namespace std;

LL pow(LL a,int b)
{
    LL r=1;
    while(b)
    {
        if(b%2)b*=a;
        a*=a;
        b/=2;
    }
    return r;
}

int main()
{
    int a,b;
    cin>>a>>b;
    LL ans=-999999999;
    int m1,m2,m3;
    int tmp=min(b,a+1);
    if(b==0)
    {
        cout<<pow(a,2)<<endl;
        for(int i=1;i<=a;i++)printf("o");
        cout<<endl;
        return 0;
    }
    for(int i=1;i<=tmp;i++)
    {
        int x=b/i;
        int y=b%i;
        LL f;
        if(i==1)f=-pow(b,2)+pow(a,2);
        else f=-pow(x+1,2)*(LL)y-pow(x,2)*(LL)(i-y)+pow(a-(i-2),2)+(LL)(i-2);
        //cout<<f<<endl;
        if(ans<f)
        {
            ans=f;
            m1=i;
            m2=x;
            m3=y;
        }
    }
    printf("%lld\n",ans);
    //cout<<m1<<" "<<m2<<" "<<m3<<endl;
    for(int i=1;i<=m1;i++)
    {
        //cout<<"m3  "<<m3<<endl;
        for(int j=1;j<=m2+((m3)>0?1:0);j++)printf("x");
        if(i<m1&&m1>1)
        {
            if(i==1)for(int j=1;j<=a-(m1-2);j++)printf("o");
            else printf("o");
        }
        else if(m1==1)for(int j=1;j<=a;j++)printf("o");
        m3--;
    }
    cout<<endl;
    return 0;
}


#include <algorithm>
#include<cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include<iterator>
using namespace std;
#define N 400000
#define M 10011
#define INF 1<<30
#define exp (1e-8)
#define mm(a,b) memset((a),b,sizeof(a))
#define PI 3.1415926535898
#define E 2.718281828459
#define LL long long
using namespace std;

LL pow(LL a,int b)
{
    LL r=1;
    while(b)
    {
        if(b%2)b*=a;
        a*=a;
        b/=2;
    }
    return r;
}

int main()
{
    int a,b;
    cin>>a>>b;
    LL ans=-999999999;
    int m1,m2,m3;
    int tmp=min(b,a+1);
    if(b==0)
    {
        LL t=pow(a,2);
        cout<<t<<endl;
        for(int i=1;i<=a;i++)printf("o");
        cout<<endl;
        return 0;
    }
    for(int i=1;i<=tmp;i++)
    {
        int x=b/i;
        int y=b%i;
        LL f;
        if(i==1)f=-pow(b,2)+pow(a,2);
        else f=-pow(x+1,2)*(LL)y-pow(x,2)*(LL)(i-y)+pow(a-(i-2),2)+(LL)(i-2);
        //cout<<f<<endl;
        if(ans<f)
        {
            ans=f;
            m1=i;
            m2=x;
            m3=y;
        }
    }
    printf("%I64d\n",ans);
    //cout<<m1<<" "<<m2<<" "<<m3<<endl;
    for(int i=1;i<=m1;i++)
    {
        //cout<<"m3  "<<m3<<endl;
        for(int j=1;j<=m2+((m3)>0?1:0);j++)printf("x");
        if(i<m1&&m1>1)
        {
            if(i==1)for(int j=1;j<=a-(m1-2);j++)printf("o");
            else printf("o");
        }
        else if(m1==1)for(int j=1;j<=a;j++)printf("o");
        m3--;
    }
    cout<<endl;
    return 0;
}


#include <algorithm>
#include<cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include<iterator>
using namespace std;
#define N 400000
#define M 10011
#define INF 1<<30
#define exp (1e-8)
#define mm(a,b) memset((a),b,sizeof(a))
#define PI 3.1415926535898
#define E 2.718281828459
#define LL long long
using namespace std;

LL pow(LL a,int b)
{
    LL r=1;
    while(b)
    {
        if(b%2)b*=a;
        a*=a;
        b/=2;
    }
    return r;
}

int main()
{
    int a,b;
    cin>>a>>b;
    LL ans=-999999999;
    int m1,m2,m3;
    int tmp=min(b,a+1);
    if(b==0)
    {
        cout<<pow(a,2)<<endl;
        for(int i=1;i<=a;i++)printf("o");
        cout<<endl;
        return 0;
    }
    for(int i=1;i<=tmp;i++)
    {
        int x=b/i;
        int y=b%i;
        LL f;
        if(i==1)f=-pow(b,2)+pow(a,2);
        else f=-pow(x+1,2)*(LL)y-pow(x,2)*(LL)(i-y)+pow(a-(i-2),2)+(LL)(i-2);
        //cout<<f<<endl;
        if(ans<f)
        {
            ans=f;
            m1=i;
            m2=x;
            m3=y;
        }
    }
    printf("%I64d\n",ans);
    //cout<<m1<<" "<<m2<<" "<<m3<<endl;
    for(int i=1;i<=m1;i++)
    {
        //cout<<"m3  "<<m3<<endl;
        for(int j=1;j<=m2+((m3)>0?1:0);j++)printf("x");
        if(i<m1&&m1>1)
        {
            if(i==1)for(int j=1;j<=a-(m1-2);j++)printf("o");
            else printf("o");
        }
        else if(m1==1)for(int j=1;j<=a;j++)printf("o");
        m3--;
    }
    cout<<endl;
    return 0;
}


#include <algorithm>
#include<cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include<iterator>
using namespace std;
#define N 400000
#define M 10011
#define INF 1<<30
#define exp (1e-8)
#define mm(a,b) memset((a),b,sizeof(a))
#define PI 3.1415926535898
#define E 2.718281828459
#define LL long long
using namespace std;

LL pow(LL a,int b)
{
    LL r=1;
    while(b)
    {
        if(b%2)b*=a;
        a*=a;
        b/=2;
    }
    return r;
}

int main()
{
    int a,b;
    cin>>a>>b;
    LL ans=-(LL)INF;
    int m1,m2,m3;
    int tmp=min(b,a+1);
    if(b==0)
    {
        cout<<pow(a,2)<<endl;
        for(int i=1;i<=a;i++)printf("o");
        cout<<endl;
        return 0;
    }
    for(int i=1;i<=tmp;i++)
    {
        int x=b/i;
        int y=b%i;
        LL f;
        if(i==1)f=-pow(b,2)+pow(a,2);
        else f=-pow(x+1,2)*(LL)y-pow(x,2)*(LL)(i-y)+pow(a-(i-2),2)+(LL)(i-2);
        //cout<<f<<endl;
        if(ans<f)
        {
            ans=f;
            m1=i;
            m2=x;
            m3=y;
        }
    }
    cout<<ans<<endl;
    //cout<<m1<<" "<<m2<<" "<<m3<<endl;
    for(int i=1;i<=m1;i++)
    {
        //cout<<"m3  "<<m3<<endl;
        for(int j=1;j<=m2+((m3)>0?1:0);j++)printf("x");
        if(i<m1&&m1>1)
        {
            if(i==1)for(int j=1;j<=a-(m1-2);j++)printf("o");
            else printf("o");
        }
        else if(m1==1)for(int j=1;j<=a;j++)printf("o");
        m3--;
    }
    cout<<endl;
    return 0;
}


#include <algorithm>
#include<cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include<iterator>
using namespace std;
#define N 400000
#define M 10011
#define INF 1<<30
#define exp (1e-8)
#define mm(a,b) memset((a),b,sizeof(a))
#define PI 3.1415926535898
#define E 2.718281828459
#define LL long long
using namespace std;

LL pow(LL a,int b)
{
    LL r=1;
    while(b)
    {
        if(b%2)b*=a;
        a*=a;
        b/=2;
    }
    return r;
}

int main()
{
    int a,b;
    cin>>a>>b;
    LL ans=-9999999999999999;
    int m1,m2,m3;
    int tmp=min(b,a+1);
    if(b==0)
    {
        LL t=pow(a,2);
        cout<<t<<endl;
        for(int i=1;i<=a;i++)printf("o");
        cout<<endl;
        return 0;
    }
    for(int i=1;i<=tmp;i++)
    {
        int x=b/i;
        int y=b%i;
        LL f;
        if(i==1)f=-pow(b,2)+pow(a,2);
        else f=-pow(x+1,2)*(LL)y-pow(x,2)*(LL)(i-y)+pow(a-(i-2),2)+(LL)(i-2);
        //cout<<f<<endl;
        if(ans<f)
        {
            ans=f;
            m1=i;
            m2=x;
            m3=y;
        }
    }
    printf("%I64d\n",ans);
    //cout<<m1<<" "<<m2<<" "<<m3<<endl;
    for(int i=1;i<=m1;i++)
    {
        //cout<<"m3  "<<m3<<endl;
        for(int j=1;j<=m2+((m3)>0?1:0);j++)printf("x");
        if(i<m1&&m1>1)
        {
            if(i==1)for(int j=1;j<=a-(m1-2);j++)printf("o");
            else printf("o");
        }
        else if(m1==1)for(int j=1;j<=a;j++)printf("o");
        m3--;
    }
    cout<<endl;
    return 0;
}


#include <algorithm>
#include<cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include<iterator>
using namespace std;
#define N 400000
#define M 10011
#define INF 1<<30
#define exp (1e-8)
#define mm(a,b) memset((a),b,sizeof(a))
#define PI 3.1415926535898
#define E 2.718281828459
#define LL long long
using namespace std;

LL pow(LL a,int b)
{
    LL r=1;
    while(b)
    {
        if(b%2)b*=a;
        a*=a;
        b/=2;
    }
    return r;
}

int main()
{
    int a,b;
    cin>>a>>b;
    LL ans=-999999999;
    int m1,m2,m3;
    int tmp=min(b,a+1);
    if(b==0)
    {
        cout<<pow(a,2)<<endl;
        for(int i=1;i<=a;i++)printf("o");
        cout<<endl;
        return 0;
    }
    for(int i=1;i<=tmp;i++)
    {
        int x=b/i;
        int y=b%i;
        LL f;
        if(i==1)f=-pow(b,2)+pow(a,2);
        else f=-pow(x+1,2)*(LL)y-pow(x,2)*(LL)(i-y)+pow(a-(i-2),2)+(LL)(i-2);
        //cout<<f<<endl;
        cout<<f<<endl;
        if(ans<f)
        {
            ans=f;
            m1=i;
            m2=x;
            m3=y;
        }
    }
    printf("%I64d\n",ans);
    //cout<<m1<<" "<<m2<<" "<<m3<<endl;
    for(int i=1;i<=m1;i++)
    {
        //cout<<"m3  "<<m3<<endl;
        for(int j=1;j<=m2+((m3)>0?1:0);j++)printf("x");
        if(i<m1&&m1>1)
        {
            if(i==1)for(int j=1;j<=a-(m1-2);j++)printf("o");
            else printf("o");
        }
        else if(m1==1)for(int j=1;j<=a;j++)printf("o");
        m3--;
    }
    cout<<endl;
    return 0;
}


#include <algorithm>
#include<cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include<iterator>
using namespace std;
#define N 400000
#define M 10011
#define INF 1<<30
#define exp (1e-8)
#define mm(a,b) memset((a),b,sizeof(a))
#define PI 3.1415926535898
#define E 2.718281828459
#define LL long long
using namespace std;

LL pow(LL a,int b)
{
    LL r=1;
    while(b)
    {
        if(b%2)b*=a;
        a*=a;
        b/=2;
    }
    return r;
}

int main()
{
    int a,b;
    cin>>a>>b;
    LL ans=-(LL)INF;
    int m1,m2,m3;
    int tmp=min(b,a+1);
    if(b==0)
    {
        cout<<pow(a,2)<<endl;
        for(int i=1;i<=a;i++)printf("o");
        cout<<endl;
        return 0;
    }
    for(int i=1;i<=tmp;i++)
    {
        int x=b/i;
        int y=b%i;
        LL f;
        if(i==1)f=-pow(b,2)+pow(a,2);
        else f=-pow(x+1,2)*(LL)y-pow(x,2)*(LL)(i-y)+pow(a-(i-2),2)+(LL)(i-2);
        //cout<<f<<endl;
        if(ans<f)
        {
            ans=f;
            m1=i;
            m2=x;
            m3=y;
        }
    }
    cout<<ans<<endl;
    //cout<<m1<<" "<<m2<<" "<<m3<<endl;
    for(int i=1;i<=m1;i++)
    {
        //cout<<"m3  "<<m3<<endl;
        for(int j=1;j<=m2+((m3)>0?1:0);j++)printf("x");
        if(i<m1)
        {
            if(i==1)for(int j=1;j<=a-(m1-2);j++)printf("o");
            else printf("o");
        }
        m3--;
    }
    cout<<endl<<" ";
    return 0;//
}


#include <algorithm>
#include<cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include<iterator>
using namespace std;
#define N 400000
#define M 10011
#define INF 1<<30
#define exp (1e-8)
#define mm(a,b) memset((a),b,sizeof(a))
#define PI 3.1415926535898
#define E 2.718281828459
#define LL long long
using namespace std;

LL pow(LL a,int b)
{
    LL r=1;
    while(b)
    {
        if(b%2)b*=a;
        a*=a;
        b/=2;
    }
    return r;
}

int main()
{
    int a,b;
    cin>>a>>b;
    LL ans=-999999999;
    int m1,m2,m3;
    int tmp=min(b,a+1);
    if(b==0)
    {
        cout<<pow(a,2)<<endl;
        for(int i=1;i<=a;i++)printf("o");
        cout<<endl;
        return 0;
    }
    for(int i=1;i<=tmp;i++)
    {
        int x=b/i;
        int y=b%i;
        LL f;
        if(i==1)f=-pow(b,2)+pow(a,2);
        else f=-pow(x+1,2)*(LL)y-pow(x,2)*(LL)(i-y)+pow(a-(i-2),2)+(LL)(i-2);
        //cout<<f<<endl;
        if(ans<f)
        {
            ans=f;
            m1=i;
            m2=x;
            m3=y;
        }
    }
    cout<<ans<<endl;
    //cout<<m1<<" "<<m2<<" "<<m3<<endl;
    for(int i=1;i<=m1;i++)
    {
        //cout<<"m3  "<<m3<<endl;
        for(int j=1;j<=m2+((m3)>0?1:0);j++)printf("x");
        if(i<m1&&m1>1)
        {
            if(i==1)for(int j=1;j<=a-(m1-2);j++)printf("o");
            else printf("o");
        }
        else if(m1==1)for(int j=1;j<=a;j++)printf("o");
        m3--;
    }
    cout<<endl;
    return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
int main(){
  cin>>n>>m;
  if(n>=m){
    ll res = (ll)n*n;
    ll mid = m/2;
    ll mid2 = m - mid;
    res-=mid*mid;
    res-=mid2*mid2;
    cout<<res<<endl;
    while(mid--)cout<<'x';
    while(n--)cout<<'x';
    while(mid2--)cout<<'x';
    cout<<endl;
  }
  else{
    int spaces = n+1;
    int cant = m/spaces;
    ll res = 0;
    vector <int> v(spaces,cant);
    int s = m%spaces;
    int cont = 0;
    while(s--){
      v[cont]++;
      cont++;
    }
    f(i,0,spaces)
    res-=v[i]*v[i];
    res+=n;
    cout<<res<<endl;
    f(i,0,spaces){
      int c =v[i];
      while(c--)cout<<'x';
      if(i+1 != spaces)
        cout<<"o";
    }
    cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
int main(){
  cin>>n>>m;
  if(n>=m){
    ll res = (ll)n*n;
    ll mid = m/2;
    ll mid2 = m - mid;
    res-=mid*mid;
    res-=mid2*mid2;
    cout<<res<<endl;
    while(mid--)cout<<'x';
    while(n--)cout<<'o';
    while(mid2--)cout<<'x';
    cout<<endl;
  }
  else{
    int spaces = n+1;
    int cant = m/spaces;
    ll res = 0;
    vector <int> v(spaces,cant);
    int s = m%spaces;
    int cont = 0;
    while(s--){
      v[cont]++;
      cont++;
    }
    f(i,0,spaces)
    res-=v[i]*v[i];
    res+=n;
    cout<<res<<endl;
    f(i,0,spaces){
      int c =v[i];
      while(c--)cout<<'x';
      if(i+1 != spaces)
        cout<<"o";
    }
    cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
int main(){
  cin>>n>>m;
  if(n>=m){
    if(m == 0){
      ll res = n*n;
      cout<<res<<endl;
      while(n--)cout<<'o';
      cout<<endl;
      return 0;
    }
    int sobra = n - m;
    int s = sobra;
    ll res;
    sobra++;
    res = (ll)sobra*sobra;
    res+=(n-sobra);
    res-=m;
    cout<<res<<endl;

    f(i,0,s)cout<<'o';
    f(i,0,m)cout<<"ox";
    cout<<endl;
  }
  else{
    int spaces = n+1;
    int cant = m/spaces;
    ll res = 0;
    vector <int> v(spaces,cant);
    int s = m%spaces;
    int cont = 0;
    while(s--){
      v[cont]++;
      cont++;
    }
    f(i,0,spaces)
    res-=v[i]*v[i];
    res+=n;
    cout<<res<<endl;
    f(i,0,spaces){
      int c =v[i];
      while(c--)cout<<'x';
      if(i+1 != spaces)
        cout<<"o";
    }
    cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
ll get_max(int a,int pp){
  ll res = 0;
  res = ll(a - pp + 1)*(a - pp + 1);
  res += (ll)(pp-1);
  return res;
}

ll get_min(int b,int qq){
  ll cant =(ll) b/qq;
  ll sobra = (ll)b%qq;
  ll res = 0;
  res+=(cant+1)*(cant+1)*sobra;
  res+=(cant)*(cant)*(qq - sobra);
  return res;
}
void pr2(int cant, char c){
  while(cant--)cout<<c;

}
void pr(int p,int a,int q,int b){
  vector <int> O(p);
  // para o
  O[0] = a - p + 1;
  f(i,1,O.size()) O[i] = 1;
  //para x
  ll cant = b/q;
  ll sobra = b%q;
  vector <ll> X(q,cant);
  int cont = 0;
  while(sobra--){
    X[cont]++;
    cont++;
  }
  int cur1 = 0 , cur2 = 0;
  if(p>q){
    pr2(O[cur1++],'o');
    while(cur1<p && cur2<q){
      pr2(X[cur2],'x');
      pr2(O[cur1],'o');
      cur1++,cur2++;
    }
  }
  else if(p<q){
    pr2(X[cur2++],'x');
    while(cur1<p && cur2<q){
      pr2(O[cur1],'o');
      pr2(X[cur2],'x');
      cur1++,cur2++;
    }
  }
  else{
    while(cur1<p && cur2<q){
      pr2(O[cur2],'x');
      pr2(X[cur1],'o');
      cur1++,cur2++;
    }
  }
}
int main(){
  cin>>n>>m;
  if(n == 0){
    ll res = (ll)m*m;
    res*=-1;
    cout<<res<<endl;
    while(m--)cout<<'x';
    cout<<endl;

  }else if(m==0){
    ll res =(ll) n*n;
    cout<<res<<endl;
    while(n--)cout<<'o';
    cout<<endl;
  }
  else{
   ll res = -10000000000000000LL;
   int pp = -1;
   int qq = -1;
   int m_p = min(n,m);
   f(p,1,m_p+1){
     f(q,p-1,p+2){
       if(q > 0){
         ll res_max = get_max(n,p);
         ll res_min = get_min(m,q);
         if(res_max - res_min > res){
          pp = p;
          qq = q;
          res = res_max - res_min;
         }
       }
     }
   }
  cout<<res<<endl;
  pr(pp, n, qq, m);
  cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
ll get_max(int a,int pp){
  ll res = 0;
  res = ll(a - pp + 1)*(a - pp + 1);
  res += (ll)(pp-1);
  return res;
}

ll get_min(int b,int qq){
  ll cant =(ll) b/qq;
  ll sobra = (ll)b%qq;
  ll res = 0;
  res+=(cant+1)*(cant+1)*sobra;
  res+=(cant)*(cant)*(qq - sobra);
  return res;
}
void pr2(int cant, char c){
  while(cant--)cout<<c;

}
void pr(int p,int a,int q,int b){
  vector <int> O(p);
  // para o
  O[0] = a - p + 1;
  f(i,1,O.size()) O[i] = 1;
  //para x
  ll cant = b/q;
  ll sobra = b%q;
  vector <ll> X(q,cant);
  int cont = 0;
  while(sobra--){
    X[cont]++;
    cont++;
  }
  int cur1 = 0 , cur2 = 0;
  if(p>q){
    pr2(O[cur1++],'o');
    while(cur1<p && cur2<q){
      pr2(X[cur2],'x');
      pr2(O[cur1],'o');
      cur1++,cur2++;
    }
  }
  else if(p<q){
    pr2(X[cur2++],'x');
    while(cur1<p && cur2<q){
      pr2(O[cur1],'o');
      pr2(X[cur2],'x');
      cur1++,cur2++;
    }
  }
  else{
   // cout<<"asd"<<endl;
    while(cur1<p && cur2<q){
      pr2(O[cur2],'o');
      pr2(X[cur1],'x');
      cur1++,cur2++;
    }
  }
}
int main(){
  cin>>n>>m;
  if(n == 0){
    ll res = (ll)m*m;
    res*=-1;
    cout<<res<<endl;
    while(m--)cout<<'x';
    cout<<endl;

  }else if(m==0){
    ll res =(ll) n*n;
    cout<<res<<endl;
    while(n--)cout<<'o';
    cout<<endl;
  }
  else{
   ll res = -10000000000000000LL;
   int pp = -1;
   int qq = -1;
   int m_p = min(n,m);
   f(p,1,m_p+1){
     f(q,p-1,p+2){
       if(q > 0){
         ll res_max = get_max(n,p);
         ll res_min = get_min(m,q);
         if(res_max - res_min > res){
          pp = p;
          qq = q;
          res = res_max - res_min;
         }
       }
     }
   }
  cout<<res<<endl;
  pr(pp, n, qq, m);
  cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
ll get_max(int a,int pp){
  ll res = 0;
  res = ll(a - pp + 1)*(a - pp + 1);
  res += (ll)(pp-1);
  return res;
}

ll get_min(int b,int qq){
  ll cant =(ll) b/qq;
  ll sobra = (ll)b%qq;
  ll res = 0;
  res+=(cant+1)*(cant+1)*sobra;
  res+=(cant)*(cant)*(qq - sobra);
  return res;
}
void pr2(int cant, char c){
  while(cant--)cout<<c;

}
void pr(int p,int a,int q,int b){
  vector <int> O(p);
  // para o
  O[0] = a - p + 1;
  f(i,1,O.size()) O[i] = 1;
  //para x
  ll cant = b/q;
  ll sobra = b%q;
  vector <ll> X(q,cant);
  int cont = 0;
  while(sobra--){
    X[cont]++;
    cont++;
  }
  int cur1 = 0 , cur2 = 0;
  if(p>q){
    pr2(O[cur1++],'o');
    while(cur1<p && cur2<q){
      pr2(X[cur2],'x');
      pr2(O[cur1],'o');
      cur1++,cur2++;
    }
  }
  else if(p<q){
    pr2(X[cur2++],'x');
    while(cur1<p && cur2<q){
      pr2(O[cur1],'o');
      pr2(X[cur2],'x');
      cur1++,cur2++;
    }
  }
  else{
    while(cur1<p && cur2<q){
      pr2(O[cur2],'x');
      pr2(X[cur1],'o');
      cur1++,cur2++;
    }
  }
}
int main(){
  cin>>n>>m;
  if(n == 0){
    ll res = (ll)m*m;
    res*=-1;
    cout<<res<<endl;
    while(m--)cout<<'x';
    cout<<endl;

  }else if(m==0){
    ll res = n*n;
    cout<<res<<endl;
    while(n--)cout<<'o';
    cout<<endl;
  }
  else{
   ll res = -10000000000000000LL;
   int pp = -1;
   int qq = -1;
   int m_p = min(n,m);
   f(p,1,m_p+1){
     f(q,p-1,p+2){
       if(q > 0){
         ll res_max = get_max(n,p);
         ll res_min = get_min(m,q);
         if(res_max - res_min > res){
          pp = p;
          qq = q;
          res = res_max - res_min;
         }
       }
     }
   }
  cout<<res<<endl;
  pr(pp, n, qq, m);
  cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
ll get_max(int a,int pp){
  ll res = 0;
  res = ll(a - pp + 1)*(a - pp + 1);
  res += (pp-1);
  return res;
}

ll get_min(int b,int qq){
  ll cant = b/qq;
  ll sobra = b%qq;
  ll res = 0;
  res+=(cant+1)*(cant+1)*sobra;
  res+=(cant)*(cant)*(qq - sobra);
  return res;
}
void pr2(int cant, char c){
  while(cant--)cout<<c;

}
void pr(int p,int a,int q,int b){
  vector <int> O(p);
  // para o
  O[0] = a - p + 1;
  f(i,1,O.size()) O[i] = 1;
  //para x
  ll cant = b/q;
  ll sobra = b%q;
  vector <ll> X(q,cant);
  int cont = 0;
  while(sobra--){
    X[cont]++;
    cont++;
  }
  int cur1 = 0 , cur2 = 0;
  if(p>q){
    pr2(O[cur1++],'o');
    while(cur1<p && cur2<q){
      pr2(X[cur2],'x');
      pr2(O[cur1],'o');
      cur1++,cur2++;
    }
  }
  else if(p<q){
    pr2(X[cur2++],'x');
    while(cur1<p && cur2<q){
      pr2(O[cur1],'o');
      pr2(X[cur2],'x');
      cur1++,cur2++;
    }
  }
  else{
    while(cur1<p && cur2<q){
      pr2(O[cur2],'x');
      pr2(X[cur1],'o');
      cur1++,cur2++;
    }
  }
}
int main(){
  cin>>n>>m;
  if(n == 0){
    ll res = (ll)m*m;
    res*=-1;
    cout<<res<<endl;
    while(m--)cout<<'x';
    cout<<endl;

  }else if(m==0){
    ll res = n*n;
    cout<<res<<endl;
    while(n--)cout<<'o';
    cout<<endl;
  }
  else{
   ll res = -100000000000000LL;
   int pp = -1;
   int qq = -1;
   int m_p = min(n,m);
   f(p,1,m_p+1){
     f(q,p-1,p+2){
       if(q > 0){
         ll res_max = get_max(n,p);
         ll res_min = get_min(m,q);
         if(res_max - res_min > res){
          pp = p;
          qq = q;
          res = res_max - res_min;
         }
       }
     }
   }
  cout<<res<<endl;
  pr(pp, n, qq, m);
  cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
ll get_max(int a,int pp){
  ll res = 0;
  res = (a - pp + 1)*(a - pp + 1);
  res += (pp-1);
  return res;
}

ll get_min(int b,int qq){
  ll cant = b/qq;
  ll sobra = b%qq;
  vector <ll> v(qq,cant);
  ll res = 0;
  res+=(cant+1)*(cant+1)*sobra;
  res+=(cant)*(cant)*(qq - sobra);
  return res;
}
void pr2(int cant, char c){
  while(cant--)cout<<c;

}
void pr(int p,int a,int q,int b){
  vector <int> O(p);
  // para o
  O[0] = a - p + 1;
  f(i,1,O.size()) O[i] = 1;
  //para x
  ll cant = b/q;
  ll sobra = b%q;
  vector <ll> X(q,cant);
  int cont = 0;
  while(sobra--){
    X[cont]++;
    cont++;
  }
  int cur1 = 0 , cur2 = 0;
  if(p>q){
    pr2(O[cur1++],'o');
    while(cur1<p && cur2<q){
      pr2(X[cur2],'x');
      pr2(O[cur1],'o');
      cur1++,cur2++;
    }
  }
  else if(p<q){
    pr2(X[cur2++],'x');
    while(cur1<p && cur2<q){
      pr2(O[cur1],'o');
      pr2(X[cur2],'x');
      cur1++,cur2++;
    }
  }
  else{
    while(cur1<p && cur2<q){
      pr2(O[cur2],'x');
      pr2(X[cur1],'o');
      cur1++,cur2++;
    }
  }
}
int main(){
  cin>>n>>m;
  if(n == 0){
    ll res = (ll)m*m;
    res*=-1;
    cout<<res<<endl;
    while(m--)cout<<'x';
    cout<<endl;

  }else if(m==0){
    ll res = n*n;
    cout<<res<<endl;
    while(n--)cout<<'o';
    cout<<endl;
  }
  else{
   ll res = -100000000000000LL;
   int pp = -1;
   int qq = -1;
   int m_p = min(n,m);
   f(p,1,m_p+1){
     f(q,p-1,p+2){
       if(q > 0){
         ll res_max = get_max(n,p);
         ll res_min = get_min(m,q);
         if(res_max - res_min > res){
          pp = p;
          qq = q;
          res = res_max - res_min;
         }
       }
     }
   }
  cout<<res<<endl;
  pr(pp, n, qq, m);
  cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
ll get_max(int a,int pp){
  ll res = 0;
  res = (a - pp + 1)*(a - pp + 1);
  res += (pp-1);
  return res;
}

ll get_min(int b,int qq){
  ll cant = b/qq;
  ll sobra = b%qq;
  ll res = 0;
  res+=(cant+1)*(cant+1)*sobra;
  res+=(cant)*(cant)*(qq - sobra);
  return res;
}
void pr2(int cant, char c){
  while(cant--)cout<<c;

}
void pr(int p,int a,int q,int b){
  vector <int> O(p);
  // para o
  O[0] = a - p + 1;
  f(i,1,O.size()) O[i] = 1;
  //para x
  ll cant = b/q;
  ll sobra = b%q;
  vector <ll> X(q,cant);
  int cont = 0;
  while(sobra--){
    X[cont]++;
    cont++;
  }
  int cur1 = 0 , cur2 = 0;
  if(p>q){
    pr2(O[cur1++],'o');
    while(cur1<p && cur2<q){
      pr2(X[cur2],'x');
      pr2(O[cur1],'o');
      cur1++,cur2++;
    }
  }
  else if(p<q){
    pr2(X[cur2++],'x');
    while(cur1<p && cur2<q){
      pr2(O[cur1],'o');
      pr2(X[cur2],'x');
      cur1++,cur2++;
    }
  }
  else{
    while(cur1<p && cur2<q){
      pr2(O[cur2],'x');
      pr2(X[cur1],'o');
      cur1++,cur2++;
    }
  }
}
int main(){
  cin>>n>>m;
  if(n == 0){
    ll res = (ll)m*m;
    res*=-1;
    cout<<res<<endl;
    while(m--)cout<<'x';
    cout<<endl;

  }else if(m==0){
    ll res = n*n;
    cout<<res<<endl;
    while(n--)cout<<'o';
    cout<<endl;
  }
  else{
   ll res = -100000000000000LL;
   int pp = -1;
   int qq = -1;
   int m_p = min(n,m);
   f(p,1,m_p+1){
     f(q,p-1,p+2){
       if(q > 0){
         ll res_max = get_max(n,p);
         ll res_min = get_min(m,q);
         if(res_max - res_min > res){
          pp = p;
          qq = q;
          res = res_max - res_min;
         }
       }
     }
   }
  cout<<res<<endl;
  pr(pp, n, qq, m);
  cout<<endl;
  }
  return 0;
}


#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).end,(v).begin
#define pb push_back
#define f(i,x,y) for(int i=x;i<y;i++)
#define FOR(it,A) for(typeof A.begin() it = A.begin();it!=A.end();it++)
#define sqr(x) (x)*(x)
#define mp make_pair
#define clr(x,y) memset(x,y,sizeof x)
#define eps 1e-07
#define SGN(x) ((x)<-eps?-1:(x)>eps?1:0)

typedef pair<int,int> pii;
typedef long long ll;
typedef long double ld;
using namespace std;
int n,m;
ll get_max(int a,int pp){
  ll res = 0;
  res = (a - pp + 1)*(a - pp + 1);
  res += (pp-1);
  return res;
}

ll get_min(int b,int qq){
  ll cant = b/qq;
  ll sobra = b%qq;
  vector <ll> v(qq,cant);
  int cont = 0;
  while(sobra--){
    v[cont]++;
    cont++;
  }
  ll res = 0;
  f(i,0,qq)
    res+=(v[i]*v[i]);
  return res;
}
void pr2(int cant, char c){
  while(cant--)cout<<c;

}
void pr(int p,int a,int q,int b){
  vector <int> O(p);
  // para o
  O[0] = a - p + 1;
  f(i,1,O.size()) O[i] = 1;
  //para x
  ll cant = b/q;
  ll sobra = b%q;
  vector <ll> X(q,cant);
  int cont = 0;
  while(sobra--){
    X[cont]++;
    cont++;
  }
  int cur1 = 0 , cur2 = 0;
  if(p>q){
    pr2(O[cur1++],'o');
    while(cur1<p && cur2<q){
      pr2(X[cur2],'x');
      pr2(O[cur1],'o');
      cur1++,cur2++;
    }
  }
  else if(p<q){
    pr2(X[cur2++],'x');
    while(cur1<p && cur2<q){
      pr2(O[cur1],'o');
      pr2(X[cur2],'x');
      cur1++,cur2++;
    }
  }
  else{
    while(cur1<p && cur2<q){
      pr2(O[cur2],'x');
      pr2(X[cur1],'o');
      cur1++,cur2++;
    }
  }
}
int main(){
  cin>>n>>m;
  if(n == 0){
    ll res = (ll)m*m;
    res*=-1;
    cout<<res<<endl;
    while(m--)cout<<'x';
    cout<<endl;

  }else if(m==0){
    ll res = n*n;
    cout<<res<<endl;
    while(n--)cout<<'o';
    cout<<endl;
  }
  else{
   ll res = -100000000000000LL;
   int pp = -1;
   int qq = -1;
   int m_p = min(n,m);
   f(p,1,m_p+1){
     f(q,p-1,p+2){
       if(q > 0){
         ll res_max = get_max(n,p);
         ll res_min = get_min(m,q);
         if(res_max - res_min > res){
          pp = p;
          qq = q;
          res = res_max - res_min;
         }
       }
     }
   }
  cout<<res<<endl;
  pr(pp, n, qq, m);
  cout<<endl;
  }
  return 0;
}


/*    brioso     */
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include<set>
#include<map>
#include<queue>

#define MAXN 1005
#define inf 0x3f3f3f3f
typedef long long ll ;
const double eps =1e-8;

using namespace std;
int a[MAXN];
int b[MAXN];
int c[MAXN];
int d[MAXN];
ll n,m;
int ans;

int main()
{
    //freopen("out.txt", "w", stdout);
    int t,cases = 0;
    scanf("%I64d %I64d",&m,&n);
    if(m >= n){
        if(n > 1){
            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */
        }
        else if(n == 1){
            printf("%I64d\n",m*m-n);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("x\n");
        }
        else{
            printf("%I64d\n",m*m);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("\n");

        }
    }
    else{
        if(m > 1){

            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < m ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            printf("%I64d\n",m*m-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */

        }
        else if(m == 1){
            printf("%I64d\n",1-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        }
        else{
            printf("%I64d\n",-1*n*n);
            for(int j = 0 ; j < n ; j++)
                printf("x");
            printf("\n");

        }
    }
    return 0;
}


/*    brioso     */
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include<set>
#include<map>
#include<queue>

#define MAXN 1005
#define inf 0x3f3f3f3f
typedef long long ll ;
const double eps =1e-8;

using namespace std;
int a[MAXN];
int b[MAXN];
int c[MAXN];
int d[MAXN];
ll n,m;
int ans;

int main()
{
    //freopen("out.txt", "w", stdout);
    int t,cases = 0;
    scanf("%I64d %I64d",&m,&n);
    if(m >= n){
        if(n > 1){
            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                ll p = m-i;
                ll q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */
        }
        else if(n == 1){
            printf("%I64d\n",m*m-n);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("x\n");
        }
        else{
            printf("%I64d\n",m*m);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("\n");

        }
    }
    else{
        if(m > 1){

            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < m ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            printf("%I64d\n",m*m-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */

        }
        else if(m == 1){
            printf("%I64d\n",1-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        }
        else{
            printf("%I64d\n",-1*n*n);
            for(int j = 0 ; j < n ; j++)
                printf("x");
            printf("\n");

        }
    }
    return 0;
}


/*    brioso     */
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include<set>
#include<map>
#include<queue>

#define MAXN 1005
#define inf 0x3f3f3f3f
typedef long long ll ;
const double eps =1e-8;

using namespace std;
int a[MAXN];
int b[MAXN];
int c[MAXN];
int d[MAXN];
ll n,m;
int ans;

int main()
{
    //freopen("out.txt", "w", stdout);
    int t,cases = 0;
    scanf("%I64d %I64d",&m,&n);
    if(m >= n){
        if(n > 1){
            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */
        }
        else if(n == 1){
            printf("%I64d\n",m*m-n);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("x\n");
        }
        else{
            printf("%I64d\n",m*m);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("\n");

        }
    }
    else{
        if(m > 1){

            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            for(int i = 1 ; i < pp+2-q%(pp+2) ; i++){
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
                printf("o");
            }
            for(int i = 1 ; i < q%(pp+2) ; i++){
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
                printf("o");
            }
            for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                printf("x");
            printf("\n");

            /*
            ll ans = 0;
            int p = n;
            for(int i = 0 ; i < m ; i++){
                ans -= (p/(m-i+1))*(p/(m-i+1));
                p -= p/(m-i+1);
            }
            ans -= p*p;
            ans += m;
            printf("%I64d\n",ans);

            for(int i = 0 ; i < m ; i++){
                for(int j  =0 ; j < n/(m-i+1) ; j++)
                    printf("x");
                printf("o");
                n -= n/(m-i+1);
            }
            for(int i = 0 ; i < n ; i++)
                printf("x");
            printf("\n");

            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        */
        }
        else if(m == 1){
            printf("%I64d\n",1-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        }
        else{
            printf("%I64d\n",-1*n*n);
            for(int j = 0 ; j < n ; j++)
                printf("x");
            printf("\n");

        }
    }
    return 0;
}


/*    brioso     */
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include<set>
#include<map>
#include<queue>

#define MAXN 1005
#define inf 0x3f3f3f3f
typedef long long ll ;
const double eps =1e-8;

using namespace std;
int a[MAXN];
int b[MAXN];
int c[MAXN];
int d[MAXN];
ll n,m;
int ans;

int main()
{
    //freopen("out.txt", "w", stdout);
    int t,cases = 0;
    scanf("%I64d %I64d",&m,&n);
    if(m >= n){
        if(n > 1){
            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                ll p = m-i;
                ll q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            ll p = m-pp;
            ll q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */
        }
        else if(n == 1){
            printf("%I64d\n",m*m-n);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("x\n");
        }
        else{
            printf("%I64d\n",m*m);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("\n");

        }
    }
    else{
        if(m > 1){

            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < m ; i++){
                ll p = m-i;
                ll q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            ll p = m-pp;
            ll q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            printf("%I64d\n",m*m-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */

        }
        else if(m == 1){
            printf("%I64d\n",1-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        }
        else{
            printf("%I64d\n",-1*n*n);
            for(int j = 0 ; j < n ; j++)
                printf("x");
            printf("\n");

        }
    }
    return 0;
}


/*    brioso     */
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include<set>
#include<map>
#include<queue>

#define MAXN 1005
#define inf 0x3f3f3f3f
typedef long long ll ;
const double eps =1e-8;

using namespace std;
int a[MAXN];
int b[MAXN];
int c[MAXN];
int d[MAXN];
ll n,m;
int ans;

int main()
{
    //freopen("out.txt", "w", stdout);
    int t,cases = 0;
    scanf("%I64d %I64d",&m,&n);
    if(m >= n){
        if(n > 1){
            int pp = 0;
            ll ans = -9223372036854775808;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                ll p = m-i;
                ll q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            ll p = m-pp;
            ll q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */
        }
        else if(n == 1){
            printf("%I64d\n",m*m-n);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("x\n");
        }
        else{
            printf("%I64d\n",m*m);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("\n");

        }
    }
    else{
        if(m > 1){

            int pp = 0;
            ll ans = -9223372036854775808;
            ll res = 0;
            for(int i = 0 ; i < m ; i++){
                ll p = m-i;
                ll q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            ll p = m-pp;
            ll q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            printf("%I64d\n",m*m-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */

        }
        else if(m == 1){
            printf("%I64d\n",1-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        }
        else{
            printf("%I64d\n",-1*n*n);
            for(int j = 0 ; j < n ; j++)
                printf("x");
            printf("\n");

        }
    }
    return 0;
}


/*    brioso     */
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include<set>
#include<map>
#include<queue>

#define MAXN 1005
#define inf 0x3f3f3f3f
typedef long long ll ;
const double eps =1e-8;

using namespace std;
int a[MAXN];
int b[MAXN];
int c[MAXN];
int d[MAXN];
ll n,m;
int ans;

int main()
{
    //freopen("out.txt", "w", stdout);
    int t,cases = 0;
    scanf("%I64d %I64d",&m,&n);
    if(m >= n){
        if(n > 1){
            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */
        }
        else if(n == 1){
            printf("%I64d\n",m*m-n);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("x\n");
        }
        else{
            printf("%I64d\n",m*m);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("\n");

        }
    }
    else{
        if(m > 1){

            /*
            for(int i = 0 ; i < m ; i++)
                printf("xo");
            for(int i = 0 ; i < n-m ; i++)
                printf("x");
            printf("\n");
            */

            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            int r = q%(pp+2);
            int l = pp+2-q%(pp+2);
            l--;

            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            if(r != 0){
                r--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                while(r--){
                    for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
            }
            else{
                l--;
                while(l--){
                    for(int j = 0 ; j < q/(pp+2) ; j++)
                        printf("x");
                    printf("o");
                }
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
            }

            printf("\n");

            /*
            ll ans = 0;
            int p = n;
            for(int i = 0 ; i < m ; i++){
                ans -= (p/(m-i+1))*(p/(m-i+1));
                p -= p/(m-i+1);
            }
            ans -= p*p;
            ans += m;
            printf("%I64d\n",ans);

            for(int i = 0 ; i < m ; i++){
                for(int j  =0 ; j < n/(m-i+1) ; j++)
                    printf("x");
                printf("o");
                n -= n/(m-i+1);
            }
            for(int i = 0 ; i < n ; i++)
                printf("x");
            printf("\n");

            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */

        }
        else if(m == 1){
            printf("%I64d\n",1-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        }
        else{
            printf("%I64d\n",-1*n*n);
            for(int j = 0 ; j < n ; j++)
                printf("x");
            printf("\n");

        }
    }
    return 0;
}


/*    brioso     */
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include<set>
#include<map>
#include<queue>

#define MAXN 1005
#define inf 0x3f3f3f3f
typedef long long ll ;
const double eps =1e-8;

using namespace std;
int a[MAXN];
int b[MAXN];
int c[MAXN];
int d[MAXN];
ll n,m;
int ans;

int main()
{
    //freopen("out.txt", "w", stdout);
    int t,cases = 0;
    scanf("%I64d %I64d",&m,&n);
    if(m >= n){
        if(n > 1){
            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            for(int i = 1 ; i < pp+2-q%(pp+2) ; i++){
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
                if(i != 1)
                printf("o");
            }
            for(int i = 1 ; i < q%(pp+2) ; i++){
                if(pp+2-q%(pp+2) != 1)
                    printf("o");
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");

            }
            if(q%(pp+2) > 0){
                    printf("o");
            for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                printf("x");
            }
            printf("\n");

            /*
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
            */
        }
        else if(n == 1){
            printf("%I64d\n",m*m-n);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("x\n");
        }
        else{
            printf("%I64d\n",m*m);
            for(int j = 0 ; j < m ; j++)
                printf("o");
            printf("\n");

        }
    }
    else{
        if(m > 1){

            int pp = 0;
            ll ans = -1*inf;
            ll res = 0;
            for(int i = 0 ; i < n ; i++){
                int p = m-i;
                int q = n;
                res = -1*(q/(i+2))*(q/(i+2)) * (i+2-q%(i+2)) - (q/(i+2)+1)*(q/(i+2)+1) * (q%(i+2)) ;
                res += p*p+i;
                if(res > ans){
                    ans = res;
                    pp = i;
                }
            }

            int p = m-pp;
            int q = n;
            printf("%I64d\n",ans);
            for(int j = 0 ; j < q/(pp+2) ; j++)
                printf("x");
            for(int j = 0 ; j < m-pp ; j++)
                printf("o");
            for(int i = 1 ; i < pp+2-q%(pp+2) ; i++){
                for(int j = 0 ; j < q/(pp+2) ; j++)
                    printf("x");
                printf("o");
            }
            for(int i = 1 ; i < q%(pp+2) ; i++){
                for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                    printf("x");
                printf("o");
            }
            for(int j = 0 ; j < q/(pp+2)+1 ; j++)
                printf("x");
            printf("\n");

            /*
            ll ans = 0;
            int p = n;
            for(int i = 0 ; i < m ; i++){
                ans -= (p/(m-i+1))*(p/(m-i+1));
                p -= p/(m-i+1);
            }
            ans -= p*p;
            ans += m;
            printf("%I64d\n",ans);

            for(int i = 0 ; i < m ; i++){
                for(int j  =0 ; j < n/(m-i+1) ; j++)
                    printf("x");
                printf("o");
                n -= n/(m-i+1);
            }
            for(int i = 0 ; i < n ; i++)
                printf("x");
            printf("\n");

            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            for(int j = 0 ; j < m ; j++)
                printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        */
        }
        else if(m == 1){
            printf("%I64d\n",1-(n/2)*(n/2) - (n-n/2)*(n-n/2));
            for(int j = 0 ; j < n/2 ; j++)
                printf("x");
            printf("o");
            for(int j = 0 ; j < n-n/2 ; j++)
                printf("x");
            printf("\n");
        }
        else{
            printf("%I64d\n",-1*n*n);
            for(int j = 0 ; j < n ; j++)
                printf("x");
            printf("\n");

        }
    }
    return 0;
}