#include <stdio.h>

#define MAX_LEN     100

int main() {
    int length, num_ones, i;
    num_ones = i = 0;
    char str[MAX_LEN];

    scanf("%d", &length);
    scanf("%s", str);

    if (length % 2 == 1)
        printf("1\n%s\n", str);
    else {
        for (int i = 0; i < length; i++) {
            if (str[i] == '1')
                num_ones++;
            if (num_ones > length / 2)
                break;
        }
        if (num_ones == length / 2) {
            printf("2\n");
            printf("%c ", str[0]);
            i = 1;
            while (i < length) {

                printf("%c", str[i]);
                i++;
            }
            printf("\n");
        } else {
            printf("1\n%s\n", str);
        }
    }
}

#include<stdio.h>
int main()
{
	int n;
	scanf("%d", &n);
	char s[102];
	scanf("%s", s);
	int i;
	int count[2];
	count[0] = count[1] = 0;
	for (i = 0; i < n; i++)
		count[s[i] - '0']++;
	if (count[0] != count[1])
		printf("1\n%s\n", s);
	else
	{
		printf("2\n");
		for (i = 0; i < n - 1; i++)
			printf("%c", s[i]);
		printf(" %c\n", s[n - 1]);
	}
	return 0;
}

#include<stdio.h>
int main(){
	int q=0;
	int n;
	scanf("%d", &n);
	char str[n+1];
	scanf("%s", str);
	int no1 = 0, no0=0;
	while(str[q]!='\0'){
		if(str[q]=='1')
			no1++;
		else
			no0++;
		q++;
	}
	if(no1!=no0){
		printf("1\n");
		printf("%s", str);
		return 0;
	}
	q=0;
	int a=0, b=0;
	int fin=0;
	while(str[q]!='\0'){
		if(str[q]=='1')
			a++;
		else
			b++;
		if(a!=b){
			int rem1 = no1-a;
			int rem0 = no0 -b;
			if(rem1!=rem0){
				fin=q;
				break;
			}
		}
		q++;
	}
	if(n==1)
	printf("1\n");
	else
		printf("2\n");
	for(int i=0;i<=fin;i++)
			printf("%c ", str[i]);
	for(int i=fin+1;i<n;i++)
			printf("%c", str[i]);
	return 0;
}

#include <stdio.h>
#include<string.h>
int main()
{
	int n;
	scanf("%d",&n);
	char ara[n];
	scanf("%s",ara);
	int x=strlen(ara),one=0,zero=0;
	if (x%2==1){
        printf("1\n%s\n",ara);
	}
	else {
        for (int j =0; j<n; j++){
            if (ara[j]=='1')
                one++;
            else
                zero++;
        }
        if (one==zero && (n/2)%2==0){
            printf("2\n");
            for(int i=0; i<n; i++){
            if (i==((n/2)-1))
                printf(" ");
            printf("%c",ara[i]);

        }
        printf("\n");
        }
        else if (one==zero && (n/2)%2==1){
            printf("2\n");
            for(int i=0; i<n; i++){
            if (i==(n/2))
                printf(" ");
            printf("%c",ara[i]);

            }
        }
        else{
            printf("1\n%s\n",ara);
        }
	}
	return 0;
}

#include<stdio.h>
int main(){
    int n,z=0,o=0;
    scanf("%d",&n);
    char s[n+5];
    scanf("%s",s);
    for(int i=0;i<n;i++){
        if(s[i]=='0'){
            z++;
        }
        else{
            o++;
        }
    }
    if(z!=o){
        printf("1\n%s",s);
    }
    else{
        printf("2\n");
        printf("%c ",s[0]);
        for(int i=1;i<n;i++){
            printf("%c",s[i]);
        }
    }
    return 0;
}

#include <stdio.h>

int main(int argc, char const *argv[]) {
  int n, num1 = 0, num0 = 0, end;
  char s[105];
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    if (s[i]=='1')  num1 ++;
    else  num0 ++;
    end = i;
    if (num1 == num0 && i == n-1) {
        end = i - 1;
    }
  }
  if (num1 == num0) printf("2\n");
  else printf("1\n");
  for (int i = 0; i <= end; i++) {
    printf("%c",s[i]);
  }
  if (num1 == num0) printf(" ");
  for (int i = end+1; i < n; i++) {
    printf("%c",s[i]);
  }
  return 0;
}

#include<stdio.h>
#include<string.h>
int kt(char a[],int k,int n){
	int cnt=0,cnt1=0;
	for(int i=k;i<n;i++){
		if (a[i]=='0') cnt++;
		else cnt1++;
	}
	if (cnt1==cnt) return 0;
	return 1;
}
void in(char a[],int k,int n){
	for (int i=k;i<n;i++){
		printf("%c",a[i]);
	}
}
int main(){
	int n;
	scanf("%d",&n);
	getchar();
	char a[1000];
	gets(a);

	if (kt(a,0,n)){
		printf("1\n");
		in(a,0,n);
	}
	else if(n==2){
		printf("2\n%c %c",a[0],a[1]);
	}
	else {
		printf("2\n");
	 for (int i=1;i<n-1;i++){
		if (kt(a,0,i) && kt(a,i,n)) {
			in(a,0,i);
			printf(" ");
			in(a,i,n);
			return 0;
		}
	}
}
}

#include<stdio.h>
#include<math.h>

int main(void)
{
	int n,check,zero=0,one=0;
	char str[101];
	scanf("%d",&n);
	scanf("%s",str);
	if(n%2==1)printf("1\n%s",str);
	if(n%2==0)
	{
		for(int i=0;i<n;i++)
		{
			if (str[i]=='0')zero++;
			else one++;
		}
		if(one==zero)
		{
			printf("2\n");
			for(int j=0;j<n-1;j++)
			printf("%c",str[j]);
			printf(" %c",str[n-1]);
		}
		else printf("1\n%s",str);
	}
	return 0;
}

#include<stdio.h>
int main()
{
    int n, i, tsum0=0, tsum1=0, sum0=0, sum1=0, rsum0, rsum1, j;
    char str[110];
    scanf("%d", &n);
    scanf(" %s ", str);
    for(i=0;i<n;i=i+1)
    {
        if(str[i]=='1')
        {
            tsum1=tsum1+1;
        }
        else
        {
            tsum0=tsum0+1;
        }
    }
    if(tsum0!=tsum1)
    {
        printf("1\n");
        printf("%s", str);
    }
    else
    {
        printf("2\n");
        for(i=0;i<n;i=i+1)
        {
            if(str[i]=='1')
            {
                sum1=sum1+1;
                rsum1=tsum1-sum1;
                rsum0=tsum0-sum0;
            }
            else
            {
                sum0=sum0+1;
                rsum1=tsum1-sum1;
                rsum0=tsum0-sum0;
            }
            if((sum1!=sum0) && (rsum0!=rsum1))
            {
                break;
            }
        }
        for(j=0;j<=i;j=j+1)
        {
            printf("%c", str[j]);
        }
        printf(" ");
        for(j=i+1;j<n;j=j+1)
        {
            printf("%c", str[j]);
        }
    }

}

#include<stdio.h>

int main(){
	int n;
	scanf("%d",&n);
	getchar();
	char a[1000];
	gets(a);
	int dem0=0,dem1=0,tmp=-1,x=0,y=0;
	for(int i=0;i<n;i++){
		if(a[i]=='1')
		x++;
		else
		y++;
	}
	if(x!=y)
	printf("1\n%s",a);
	else if(n==1)
	printf("1\n%s",a);
	else if(n==2)
	printf("2\n%c %c",a[0],a[1]);
	else{
		printf("2\n");
		for(int i=0;i<n/2;i++){
			if(a[i]=='1'){
			tmp++;
			dem1++;
			}
			else{
			tmp++;
			dem0++;
		}
	}
	if(dem1==dem0)
	tmp++;
	for(int i=0;i<=tmp;i++){
		printf("%c",a[i]);
	}
	printf(" ");
	for(int i=tmp+1;i<n;i++){
		printf("%c",a[i]);
		}
	}
	return 0;
}

/*bai 1189 A*/

#include<stdio.h>
#include<string.h>

int main(){
	int n;
	scanf("%d",&n);
	char c[1000];
	scanf("%s",c);
	int cnt1=0, cnt2=0;
	for(int i=0;i<n;i++){
		if(c[i]=='1')
			cnt1++;
		else cnt2++;
	}
	if(cnt1!=cnt2){
		printf("1\n");
		printf("%s",c);
	}
	else {
		printf("2\n");
		printf("%c ", c[0]);
		for(int i=1;i<n;i++){
			printf("%c", c[i]);
		}
	}
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned long long ll;
typedef long double LD;

#define MAXN 1000002

#ifndef ONLINE_JUDGE
#define DEBUG
#endif

#define MIN(a,b) (((a)<(b))?(a):(b))

char arr[101];

int main(void)
{
    int N;
    int i;
    int ones,zeroes;
	#ifndef ONLINE_JUDGE
	FILE * fp;
	fp = freopen("F:\\work\\trials\\codeforces\\1189\\A\\1189A.TXT","r",stdin);
	if (fp == NULL)
    {
        printf ("\n Cannot open File");
        exit (1);
    }
	#endif

    scanf("%d",&N);

    scanf("%s",arr);

    ones = 0;
    zeroes = 0;
    for (i=0; i<N; i++)
    {
        if (arr[i] == '0')
        {
            zeroes++;
        }
        else
        {
            ones++;
        }
    }

    if (ones != zeroes)
    {
        //good
        printf ("1\n");
        printf ("%s\n", arr);
    }
    else
    {
        printf ("2\n");
        printf ("%c %s\n",arr[0],arr+1);
    }

    return (0);
}

#include <stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
long long cmpfunc (const void * a, const void * b) {
   return ( *(long long*)a - *(long long*)b );
}

int main(void){

long long int test,i,j,n,count,flag=0,o1=0,o2=0,b1,x,m,l,max,sum2,min,f,c,r,o,sum1,sum=0,y,b,count1=0,a2,b2;
char a[100000];
scanf("%lld%s",&n,a);
count=count1=0;
for(i=0;i<n;i++){
    if(a[i]=='0'){
        count++;
    }else{
        count1++;
    }
}
if(count==count1){
    printf("2\n");
    for(i=0;i<n-1;i++){
        printf("%c",a[i]);
    }
    printf(" %c",a[n-1]);
}else{

    printf("1\n%s",a);
}
return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
long long int cmpfunc( const void *a, const void *b) {
  return *(long long int*)a - *(long long int *)b;
}

int main()
{
 long long int test,d,n,x,i,sum=0,count=0,j,flag=0,p,y,max=0,o,g,r,k,sum1=0,m;
char a[100000];
scanf("%lld%s",&n,a);
long long int z1=0,o1=0;
for(i=0;i<n;i++){
    if(a[i]=='0'){
        z1++;
    }else{
        o1++;
    }
}
if(o1==z1){
    a[n]=a[n-1];
    a[n-1]=' ';
    printf("2\n%s",a);
}else{
    printf("1\n%s",a);
}

    return 0;
}

#include <stdio.h>

int main(){
int i,j,k,n;
char s[101];
j = k = 0;
scanf("%i\n%100s",&n,s);
for (i=0;i<n;i++){
	if(s[i] == '0')
		j++;
	else
		k++;
	}
if (k!=j)
	printf("1\n%s",s);
else
	printf("2\n%c %s",s[0],s+1);

return 0-0;
}

#include<stdio.h>
#include<string.h>
char str[1001];
int pre1[1009];
int pre0[1009];
int main() {
	int n,k,i,j,len;
	while (scanf("%d", &n) != EOF) {
		getchar();
		fgets(str, sizeof(str), stdin);
		len = n;
		if (str[0] == '0')pre0[0] = 1;
		else pre1[0] = 1;
		for (i = 1; i < len; i++) {
			if (str[i] == '0') {
				pre0[i]=1+pre0[i-1];
				pre1[i] = pre1[i - 1];
			}
			else if (str[i] == '1') {
				pre1[i] = 1 + pre1[i - 1];
				pre0[i] = pre0[i - 1];
			}
		}
		if (len == 1)printf("1\n%c", str[0]);
		else if (pre1[n - 1] != pre0[n - 1]) {
			printf("1\n");
			for (j = 0; j < len;j++)printf("%c", str[j]);
		}
		else {
			for (i = 0; i < len; i++) {
				if (pre1[i] != pre0[i] && ((pre1[n - 1] - pre1[i]) != (pre0[n - 1] - pre0[i]))) {
					printf("%d\n", 2);
					for (j = 0; j <len; j++) {
						if (j == i)printf("%c ", str[j]);
						else printf("%c", str[j]);
					}
					break;
				}
			}
		}
		printf("\n");
		memset(str, 0, sizeof(str));
		memset(pre1, 0, sizeof(pre1));
		memset(pre0, 0, sizeof(pre0));
	}
	return 0;
}

#include <stdio.h>
#define N 100

int is_good(const char *s, int k){
    int count_z=0, count_o=0;

    for (int i=0; i<k; i++){
        if (s[i]=='0') count_z++;
        else count_o++;
    }
    if (count_z!=count_o) return 1;
    return 0;
}
void solve(const char *s, int n){
    int k=1;

    while (!is_good(s, k)) k++;
    printf("2\n");
    for (int i=0; i<k; i++) printf("%c", s[i]);
    printf(" ");
    for (int i=k; i<n; i++) printf("%c", s[i]);
}

int main(){
    int n;
    char s[N+1];

    scanf("%d", &n);
    scanf("%s", s);

    if (is_good(s, n)){
        printf("1\n%s", s);
        return 0;
    }
    solve(s, n);

    return 0;
}

#include <stdio.h>
#define N 100

int is_good(const char *s, int k){
    int count_z=0, count_o=0;

    for (int i=0; i<k; i++){
        if (s[i]=='0') count_z++;
        else count_o++;
    }
    if (count_z!=count_o) return 1;
    return 0;
}
void solve(const char *s, int n){

    printf("2\n%c ", s[0]);
    for (int i=1; i<n; i++) printf("%c", s[i]);
}

int main(){
    int n;
    char s[N+1];

    scanf("%d", &n);
    scanf("%s", s);

    if (is_good(s, n)){
        printf("1\n%s", s);
        return 0;
    }
    solve(s, n);

    return 0;
}

#include<stdio.h>
#include<stdlib.h>

int main()
{
	int len,i,one=0,zero=0;
	char* str;
	char last,a;

	scanf("%d",&len);

	str=(char *)malloc(sizeof(char)*len);
	scanf("%c",&a);

	gets(str);

	for (i = 0; i < len; ++i)
	{
		if(str[i]=='1')
			one++;
		else
			zero++;
	}

	if(one!=zero)
	{
		printf("1\n%s",str);
		return 0;
	}
	else
	{
			last=str[len-1];
			str[len-1]=(char)32;
			printf("2\n%s%c",str,last);
			return 0;
	}

}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
/*kneau reeves*/
int main() {
	int n,s1=0,s2=0,i;
	char ch[100];
	char sh;
    scanf("%d",&n);
    scanf("%s",ch);
	for (i=0;i<n;i++) {
		if (ch[i]=='0') s1++ ;

		else
		    s2++;
	}
	if (s1==s2)
	{
	  sh = ch[n-1];
	  ch[n-1]='\0';
	  printf ("2\n%s",ch);
	  printf (" %c",sh);
    }
    else
        printf("1\n%s",ch);

	return 0;

}

#include<stdio.h>
#include<string.h>

int main(){
	int n;
	scanf("%d",&n);
	char c[1000];
	scanf("%s",c);
	int cnt1=0, cnt2=0;
	for(int i=0;i<n;i++){
		if(c[i]=='1')
			cnt1++;
		else cnt2++;
	}
	if(cnt1!=cnt2){
		printf("1\n");
		printf("%s",c);
	}
	else {
		printf("2\n");
		printf("%c ", c[0]);
		for(int i=1;i<n;i++){
			printf("%c", c[i]);
		}
	}
}

#include <stdio.h>
#include <string.h>
int main(){
	char Str[101];
	int len, numberUnits = 0, numberZeros = 0, delimeters = 1;
	scanf("%i%[^\n]", &len);
	scanf("%100s%[^\n]", Str);
	Str[len] = '\0';
	if(len % 2 == 1)
		printf("%i\n%s", delimeters, Str);
	else{
		for(int i = 0; i < len; i++){
			if(Str[i] == '1')
				numberUnits += 1;
			if(Str[i] == '0')
				numberZeros += 1;
		}
		//printf("%i\n%i", numberZeros, numberUnits);
		if(numberZeros == numberUnits){
			char copyStr[101];
			copyStr[len-1] = '\0';
			strncpy(copyStr, Str, len-1);
			delimeters += 1;
			printf("%i\n%s %s", delimeters, copyStr, (Str + len -1));
		}
		else
			printf("%i\n%s", delimeters, Str);
	}
	return 0;
}

#include<stdio.h>
int main()
{
    char s[101];
    int n,i,count0,count1;

    scanf("%d %s",&n,&s);

    count0=0;
    count1=0;
    for(i=0;s[i];i++)
    {
        if(s[i]=='0')
            ++count0;
        else if(s[i]=='1')
            ++count1;
    }

    if(count0!=count1)
        printf("1\n%s\n",s);

    else
    {
        printf("2\n");
        printf("%c ",s[0]);

        for(i=1;s[i];i++)
            printf("%c",s[i]);

        printf("\n");
    }

return 0;
}

//best actor==keanu reeves//
#include<stdio.h>
int main()
{
    int n,i,keanu=0,reeves=0;
    char s[102];
    scanf("%d %s", &n,s);
    for(i=0;i<n;i++)
    {
        if(s[i]=='1')
        {
            keanu++;
        }
        else{
            reeves++;
        }

    }
    if(keanu!=reeves){
            printf("1\n%s",s);
        }
            else{
                printf("2\n%c %s", s[0], s+1);
            }
            return 0;
}

#include<stdio.h>
#include<string.h>
 int main()
 {
    int i,x,y=0,z=0;
    scanf("%d", &x);
    char str[x];
    scanf("%s", str);
    for(i=0;i<x;i++){
        if(str[i]=='1') y++;
        else z++;
    }
    if(y==z)
    {
        printf("2\n");
        for(i=0;i<x-1;i++)
        {
            printf("%c", str[i]);
        }
        printf(" %c", str[x-1]);
    }
    else{
        printf("1\n");
        printf("%s", str);
    }
     return 0;
 }

#include <stdio.h>
#include <stdlib.h>
#include<string.h>
#include<ctype.h>

int main()
{
    int n,i,j,nb,nb1,nb2,pos,k;
    scanf("%d",&n);
     char q,s[n];
    scanf("%s",s);
     nb1=0;
     nb2=0;
     nb=0;
    for (i=0 ; i<n; i++){
            if (s[i]=='1')
               nb++;
            else nb1++;
    }
    if (nb==nb1){
        q=s[n-1];
        s[n-1]='\0';
        printf("2\n%s ",s);
        printf("%c",q);
        }
        else printf("1\n%s",s);

    return 0;
}

#include <stdio.h>

int main(void)
{
 int n,ones=0,zeros=0;
 scanf("%d",&n);
 char  a[n];
 for(int i=0;i<n;i++)
 {
     scanf(" %c",&a[i]);
     if(a[i]=='1')
     ones++;
     else
     zeros++;
    // printf("%c\n",a[i]);
 }

 if(ones==zeros)
 {
     printf("2\n");
     if(n>=2)
     {

     for(int i=0;i<1;i++)
     {
       printf("%c",a[i]);
     }
     printf(" ");
     for(int i=1;i<n;i++)
     {
         printf("%c",a[i]);
     }

     }
     else
     {
         for(int i=0;i<n;i++)
         {
             printf("%c",a[i]);
         }
     }
 }
 else
 {
     printf("1\n");
     for(int i=0;i<n;i++)
     {
         printf("%c",a[i]);
     }
 }

}

#include<stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	char s[100];
	scanf("%s",&s);
	int dem0=0,dem1=0;
	for(int i=0;i<n;i++)
	{
		if(s[i]=='0') dem0++;
		else dem1++;
	}
	if(dem0!=dem1)
	{
		printf("1\n%s",s);
	}
	else
	{
		printf("2\n%c ",s[0]);
		for(int i=1;i<n;i++)
		{
			printf("%c",s[i]);
		}
	}
return 0;
}

#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
	int n,z=0,u=0,i=0,nb;
	char q, s[100];
	scanf("%d",&n);
	scanf("%s",s);
	for (i=0;i<n;i++)
	{
		if(s[i]=='0') z++ ;
		else u++ ;
	}
	if(z==u)
	{
        q=s[n-1];
		s[n-1]='\0';
		printf("2\n%s ",s);
		printf("%c",q);
    }
	else
	{ printf("1 \n");
	  printf("%s",s) ;

}

	return 0;
}

#include<stdio.h>
#include<stdlib.h>
main()
{
	int n,zero=0,one=0,i;
	scanf("%d",&n);
	char s[100];
	scanf("%s",s);
	for(i=0;i<n;++i)
	{
		if(s[i]=='0')
		{
			zero++;
		}
		else
		{
			one++;
		}
	}
	if(zero!=one)
	{
		printf("1\n");
		printf("%s",s);
	}
	else
	{
       printf("2\n");
       char c=s[n-1];
       s[n-1]='\0';
       printf("%s %c",s,c);

	}
}

#include <stdio.h>

int main()
{
	int n;
	scanf ("%d", &n);
	char s[1005];
	scanf ("%s", s);
	int s1=0, s2=0;
	for (int i=0; i<n; ++i) {
		if (s[i]=='1') s1++;
		else s2++;
	}
	if (s1!=s2) printf ("1\n%s", s);
	else {
		printf ("2\n");
		printf ("%c ", s[0]);
		for (int i=1; i<n; ++i) {
			printf ("%c", s[i]);
		}
	}

	return 0;
}

// QuynhQuynh

#include <stdio.h>
#include <string.h>

int main()
{
	int n,i,a,one=0;
	scanf("%d",&n);
	char s[1001];
	scanf("%s",s);
	for(i=0;i<n;i++)
	if(s[i]=='1') one++;
	int zero=strlen(s)-one;
	if(one!=zero)
	{
		printf("1\n%s\n",s);
	}
	else
	{
		printf("2\n");
		printf("%c ",s[0]);
		for(i=1;i<n;i++) printf("%c",s[i]);
		puts("");
	}

	return 0;
}

#include<stdio.h>
int main()
{
    int n,i,j;
    scanf("%d",&n);
    char s[n+1];
    scanf("%s",s);
    int count_0=0,count_1=0;
    for(i=0;i<n;i++){
        if(s[i]=='0')
            count_0++;
        else
            count_1++;
    }
    if(n==1){
        printf("1\n");
        printf("%c ",s[0]);
    }
    else if(count_0>count_1||count_1>count_0){
        printf("1\n");
        printf("%s\n",s);
    }
    else{
        printf("2\n");
    printf("%c ",s[0]);

    for(i=1;i<n;i++){
        printf("%c",s[i]);
    }
    }
}

#include <stdio.h>
#include <string.h>
int main()
{
    int i,j=0,n,k;
    char s[102];
    scanf("%d",&n);
    scanf("%s",s);
    if(n==1)
    {
        printf("%d\n",1);
        printf("%s",s);
    }
    else
    {

        for(i=0;i<n;i++)
    {
        if(s[i]=='0')
        j=j+1;

    }
    if(j!=n-j)
    {
        printf("%d\n",1);
        printf("%s",s);

    }
    else
    {
       printf("%d\n",2);
        printf("%c ",s[0]);
        for(i=1;i<strlen(s);i++)
        {
            printf("%c",s[i]);
        }

    }

    }

    return 0;
}

#include <stdio.h>

int main()
{
    int i, j, n;
    char s[128];
    scanf("%d\n%s", &n, s);
    for (i = 0, j = 0; i < n; i++)
        if (s[i] == '0')
            j++;
    if (j + j != n)
        printf("1\n%s\n", s);
    else
        printf("2\n%c %s\n", s[0], s + 1);
    return 0;
}

#include<stdio.h>
#include<string.h>
char s[105];
int compare(char a[])
{
	int o=0,z=0;
	for(int i=0;a[i]!='\0';i++){
		if(a[i]=='0'){
			z++;
		}
		if(a[i]=='1'){
			o++;
		}
	}
	if(o==z)return 0;
	else return 1;
}
int main()
{
	int n;
	scanf("%d",&n);
	getchar();
	gets(s);
	if(compare(s)==1){
		printf("1\n");
		printf("%s\n",s);
	}
	else{
		for(int i=1;i<strlen(s);i++){
			char a[105],b[105];
			for(int j=0;j<i;j++){
				a[j]=s[j];
			}
			a[i]='\0';
			if(compare(a)==0)continue;
			for(int j=i;j<strlen(s);j++){
				b[j-i]=s[j];
			}
			b[strlen(s)-i]='\0';
			if(compare(b)==0)continue;
			printf("2\n");
			printf("%s %s\n",a,b);
			break;
		}
	}
}

    #include <stdio.h>
    #include <string.h>
    int main(void){
        // Your code here!
        int i,j,N,count1=0,count0=0;
        scanf("%d",&N);
        char str[N];
       // gets(str);
       // printf("%s",str);
       scanf("%s",str);
       for(i=0;i<N;i++)
       {
           if (str[i]=='1')
           count1++;
           else if(str[i]=='0')
           count0++;
       }
    if(N!=1){
       if(count1!=count0)
      { printf("1\n");
      // puts(str);
    printf("%s",str);
      }
      else if(count0==count1)
      {
          printf("2\n");
          printf("%c ",str[0]);
          for(j=1;j<N;j++)
          {
              printf("%c",str[j]);
          }
      }
    }
    else if(N==1){
    printf("1\n%s",str);
    }
    }

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>

int main(void) {

    int c;
    ptrdiff_t n;

    ptrdiff_t i = 0;
    int c0 = 0;

    while ((c = getchar()) != 10)
        n = n * 10 + c - 48;

    char* s = malloc(n * sizeof(char));
    if (s == NULL)
        return -1;

    while ((c = getchar()) != 10) {
        if (c == 48)
            c0 += 1;
        s[i++] = c;
    }

    if (n - c0 == c0) {
        putchar(50);
        putchar(10);
        putchar(*s);
        putchar(32);
        for (i = 1; i < n; i += 1) {
            putchar(*(s + i));
        }
    } else {
        putchar(49);
        putchar(10);
        for (i = 0; i < n; i += 1) {
            putchar(*(s + i));
        }
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main ()
{
	int n ;
	scanf("%d",&n);

	char string[n] ;
	scanf("%s",string);

	if(n%2 == 0)
	{
		int zeroes=0,ones=0;
		for(int i=0;i<n;i++)
		{
			if(string[i] == '0')
			{
				zeroes++ ;
			}
			else
			{
				ones++ ;
			}
		}
		if(zeroes == ones)
		{
			printf("2\n");
			for(int i=0;i<n-1;i++)
		    {
			    printf("%c",string[i]);
		    }
		    printf(" %c",string[n-1]);
		    printf("\n");
		}
		else
		{
			printf("1\n");
		for(int i=0;i<n;i++)
		{
			printf("%c",string[i]);
		}
		printf("\n");
		}

	}
	else
	{
		printf("1\n");
		for(int i=0;i<n;i++)
		{
			printf("%c",string[i]);
		}
		printf("\n");
	}

}

#include <stdio.h>
int main()
{
    int n,j,c0=0,c1=0;
    scanf("%d", &n);
    char string[n+1];
    scanf("%s", string);
    for(int i = 0; i < n; i++)
    {
        c0 = 0;
        c1 = 0;
        for(j = i; j < n; j++)
        {
            if(string[j] == '0') c0++;
            else c1++;
        }
        if(i == 0 && c0 != c1) { printf("1\n"); printf("%s\n",string); return 0;}
        else if(c0 != c1) { printf("2\n"); for(int k = 0; k < i; k++) printf("%c",string[k]); printf(" "); for(int k = i; k < n; k++) printf("%c",string[k]); return 0;}
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int x=0,y=0,i,j,n;
    char ara[109];
    scanf("%d%s",&n,ara);
    for(i=0;i<n;i++){
        if(ara[i]=='1'){
            x++;
        }
        else{
            y++;
        }
    }
    if(x==y){
        printf("%d\n",2);
        printf("%c %s",ara[0],ara+1);
    }
    else{
        printf("%d\n",1);
        printf("%s",ara);
    }
    return 0;
}

#include<stdio.h>
int main()
{
    int n,i,odd=0,even=0;
    char s[105];
    scanf("%d",&n);
    scanf("%s",s);
    for(i=0 ; i<n ; i++)
    {
        if(s[i]=='0')
            even++;
        else
            odd++;
    }
    if(even!=odd)
    {
        printf("1\n%s\n",s);
    }
    else
    {
        printf("2\n");
        for(i=0 ; i<n-1 ; i++)
            printf("%c",s[i]);
            printf(" ");
            printf("%c",s[i]);
    }
    return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
    int n, i, j, sum, zero = 0, one = 0;

    scanf("%d", &n);

    char name[n];

    scanf(" %s", name);

    for(i=0; i<n; i++){

        if(name[i] == '0'){

            zero++;
        }
        else{

            one++;
        }
    }

    if(zero != one)
    {

        printf("1\n%s\n", name);
    }
    else
    {

        printf("2\n");

        for(i=0; i<n-1; i++){

            printf("%c", name[i]);
        }

        printf(" %c\n", name[n-1]);
     }

    return 0;

}

#include<stdio.h>

int main()
{
    int n,i,p;
    scanf("%d",&n);
    char a[n+3];
    scanf("%s",a);

    if(n%2) printf("1\n%s",a);
    else
    {
        p=0;
        for(i=0;i<n;i++) if(a[i]=='0') p++;
        if(p==n/2) printf("2\n%c %s",a[0],a+1);
        else printf("1\n%s",a);
    }
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
   int n,i,c=0;
   scanf("%d",&n);
   char l[n+1];
   scanf("%s",l);
   for(i=0;i<n;i++){
   if(l[i]=='1')c++;
   }
   if(n%2==1 || c!=n/2)printf("1\n%s",l);
   else {
   printf("2\n%c ",l[0]);
   for(i=1;i<n;i++)printf("%c",l[i]);
   }
}

#include<stdio.h>

int main ()
{
	int n,p,q;
	p=0;
	q=0;
	scanf("%d",&n);
    char str[n+1];
    int i,j,k;
	scanf("%s",str);
    for(i=0;i<n;i++)
    {
    	if(str[i]=='1')
    	{
    		p++;
		}
		else
		{
			q++;
		}
	}

    if(p==q)
    {
    	printf("2\n");
    	for(i=0;i<n-1;i++)
    	{
    		printf("%c",str[i]);
		}
		printf(" %c",str[n-1]);
	}
	else
	{
		printf("1\n");
    	for(i=0;i<n;i++)
    	{
    		printf("%c",str[i]);
		}
	}
    return 0;
}

#include<stdio.h>
int main(void)
{
    int i,j,n,k=0,zero=0,one=0;
    scanf("%d",&n);
    char string[n+1];
    scanf("%s",string);
    for(i=0;string[i]!='\0';i++)
    {
        if(string[i]=='0')
            zero++;
        else
            one++;
    }
    if(one!=zero)
    {
        printf("%d\n",1);
        printf(string);
    }
    else
    {
        printf("2\n");
        printf("%c ",string[0]);
        for(i=1;string[i]!='\0';i++)
            printf("%c",string[i]);
    }
    return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
    int n;
    scanf("%d",&n);
    char s[n]; int i,count0=0,count1=0,flag=0,count=0;
    scanf("%s",s);
    for(i=0;i<n;i++){
        if(s[i]=='0') count0++;
        else count1++;
    }
    if(count0!=count1){
        printf("1\n");
        if((count1==1 && count0==0)||(count1==0 && count0==1)){
            printf("%c",s[0]);
            flag=1;
        }
        else printf("%s",s);
    }
    else{
        printf("2\n");
        for(i=0;i<n-1;i++){
            printf("%c",s[i]);
        }
        printf(" ");
        printf("%c",s[n-1]);
    }
return 0;
}

#include<stdio.h>
int main()
{
    int n;
    scanf("%d",&n);
    int zero=0,one=0,i=0;
    char string[100];
    scanf("%s",string);
    while(i<n){
        if(string[i]-'0'==0)
            zero++;
        else
            one++;
        i=i+1;
    }
    if(zero!=one)
    {
        printf("1\n");
        printf("%s",string);
    }
	else
    {
        printf("2\n");
        printf("%c ",string[0]);
        int i=1;
        while(i<n)
        {
            printf("%c",string[i]);
            i=i+1;
        }
    }
return 0;
}

#include <stdio.h>
#include <string.h>
//chuoi tach ra >1 chu so
//giai phap luon ton tai ?
//CO NHIEU CAU TRA LOI
//cat chuoi toi thieu -> 1 hoac 2

int main()
{
	int n;
	scanf("%d",&n);
	char c[1000];
	scanf("%s",&c);
	int dem1=0;
	int dem0=0;
	for(int i=0;i<n;i=i+1)
	{
		if(c[i]=='1'){
			dem1=dem1+1;
		}
		else{
			dem0=dem0+1;
		}
	}

	if(dem0!=dem1){
		printf("1\n");
		printf("%s",c);
		return 0;
	}
	else{
		printf("2\n");
		printf("%c ",c[0]);
		for(int i=1;i<n;i=i+1){
			printf("%c",c[i]);
		}
		return 0;
	}
}

    #include<stdio.h>
    int main()
    {
        int n,i,j,zero=0,one=0;
        char c;
        scanf("%d",&n);
        //printf("%d\n",n);
        scanf("%c",&c);
        char crr[n];
        int arr[n];
        int brr[n];
        for(i=0;i<n;i++)
        {
            scanf("%c",&crr[i]);
            if(crr[i]=='1')one++;
            if(crr[i]=='0')zero++;
            arr[i]=one;
            brr[i]=zero;
        }
        if(one==zero)
        {
        for(i=0;i<n;i++)
        {
            if(arr[i]!=brr[i])
            {
                if((one-arr[i])!=(zero-brr[i]))break;
            }
        }
        if(n!=1)printf("2\n");
        else printf("1\n");
        for(j=0;j<n;j++)
        {
            printf("%c",crr[j]);
            if(j==i && n!=1)printf(" ");
        }
        }
        else
        {
            printf("1\n");
            for(j=0;j<n;j++)
            {
                printf("%c",crr[j]);
            }
        }
    }

#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int main() {
    char n[1000];
    long long s,k,l=0;
    scanf("%lld",&s);
    scanf("%s",&n);
    k=strlen(n);
    if (k%2==1)
        printf("1\n%s",n);
    else {
        for (int i=0;i<s;i++){
            if (n[i]==0)
                k++;
        }
        if (k==(s/2))
            printf("1\n%s",n);
        else {
            printf("2\n%c ",n[0]);
        for (int i=1;i<s;i++){
            printf("%c",n[i]);
        }
        }
    }

    return (EXIT_SUCCESS);
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    int n;
    int k;
    char tmp[100];
    char s[100]="";
    char s1[100]="";

    scanf("%i\n", &n);
    gets(s);

    for(int i=0; i<strlen(s);i++){
        if ((s[i]=='0') && (s[++i]=='0')){
            strncpy(s1,s,i+1);
            k=i+1;
            break;
        }
    }

    if (n == 2){
            if (s[0]!=s[1]){
                printf("2\n");
                printf("%c ",s[0]);
                printf("%c",s[1]);
            }
            else {
                printf("1\n");
                printf("%s",s);
            }
        }
    else if (strlen(s)%2==0){
        printf("2\n");
        printf("%s ",s1);
        for(int i =k; i<strlen(s); i++){
            printf("%c",s[i]);
        }
    }
    else{
        printf("1\n");
        printf("%s ",s);
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
/*kneau reeves*/
int main() {
	int n,s1=0,s2=0,i;
	char ch[100],sh[100];
    scanf("%d",&n);
    scanf("%s",ch);
	for (i=0;i<n;i++) {
		if (ch[i]=='0')
		    s1+=1;
		else
		    s2+=1;
	}
	if (s1!=s2) {
		printf("%d\n",1);
		printf("%s",ch);
    }
	else {
		for (i=0;i<n-1;i++) {
			sh[i]=ch[i];
		}
		sh[n]='\0';
		printf("%d\n",2);
		printf("%s %c",sh,ch[n-1]);
	}
	return 0;
}

#include<stdio.h>

int main()
{
    int n ,i, arr[100],zero=0,one=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&arr[i]);
        if(arr[i]==1) one++;
        else  zero++;
    }
    if(n==1)
    {
        printf("1\n");
        printf("%d",arr[0]);
    }
    else if(one!=zero)
    {
        printf("1\n");
        for(i=0;i<n;i++)
            printf("%d",arr[i]);
    }
    else if(one==zero)
    {
        printf("2\n");
        for(i=0;i<n-1;i++)
            printf("%d",arr[i]);
        printf(" %d",arr[n-1]);
    }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned long long ll;
typedef long double LD;

#define MAXN 1000002

#ifndef ONLINE_JUDGE
#define DEBUG
#endif

#define MIN(a,b) (((a)<(b))?(a):(b))

char arr[101];

int main(void)
{
    int N;
    int i;
    int ones,zeroes;
	#ifndef ONLINE_JUDGE
	FILE * fp;
	fp = freopen("F:\\work\\trials\\codeforces\\1189\\A\\1189A.TXT","r",stdin);
	if (fp == NULL)
    {
        printf ("\n Cannot open File");
        exit (1);
    }
	#endif

    scanf("%d",&N);

    scanf("%s",arr);

    ones = 0;
    zeroes = 0;
    for (i=0; i<N; i++)
    {
        if (arr[i] == '0')
        {
            zeroes++;
        }
        else
        {
            ones++;
        }
    }

    if (ones != zeroes)
    {
        //good
        printf ("%s\n", arr);
    }
    else
    {
        printf ("%c %s\n",arr[0],arr+1);
    }

    return (0);
}

#include<stdio.h>
int main()
{
    int n,i,j,zero=0,one=0;
    char c;
    scanf("%d",&n);
    //printf("%d\n",n);
    scanf("%c",&c);
    char crr[n];
    int arr[n];
    int brr[n];
    for(i=0;i<n;i++)
    {
        scanf("%c",&crr[i]);
        if(crr[i]=='1')one++;
        if(crr[i]=='0')zero++;
        arr[i]=one;
        brr[i]=zero;
    }
    for(i=0;i<n;i++)
    {
        if(arr[i]!=brr[i])
        {
            if((one-arr[i])!=(zero-brr[i]))break;
        }
    }
    if(n!=1)printf("2\n");
    else printf("1\n");
    for(j=0;j<n;j++)
    {
        printf("%c",crr[j]);
        if(j==i && n!=1)printf(" ");
    }

}

//practice with dukkha
#include<stdio.h>
int main()
{
    int a;
    scanf("%d",&a);
    char b[10000];
    scanf("%s",b);
    if(a%2==1)
    {
        printf("1\n%s",b);
        return 0;
    }
    int count=0;
    for(int i=0;i<a;i++)
        count+=b[i]-'0';
    int sum=0;
    for(int i=0;i<a;i++)
    {
        sum+=b[i]-'0';
        int r=count-sum;
        int len=a-1-i;
        int zero=len-r;
        int curl=i+1;
        int cur0=curl-sum;
        if(r!=zero && cur0!=sum)
        {
            printf("2\n");
            for(int j=0;j<=i;j++)
                printf("%c",b[j]);
            printf(" ");
            for(int j=i+1;j<a;j++)
                    printf("%c",b[j]);
                return 0;
        }
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
int kt(char a[],int k,int n){
	int cnt=0,cnt1=0;
	for(int i=k;i<n;i++){
		if (a[i]=='0') cnt++;
		else cnt1++;
	}
	if (cnt1==cnt) return 0;
	return 1;
}
void in(char a[],int k,int n){
	for (int i=k;i<n;i++){
		printf("%c",a[i]);
	}
}
int main(){
	int n;
	scanf("%d",&n);
	getchar();
	char a[1000];
	gets(a);
	printf("2\n");
	if (strlen(a)==1){
		printf("1\n%d",a[0]);
	}
	else if(strlen(a)==2){
		printf("2\n%d %d",a[0],a[1]);
	}
	else {
	for (int i=1;i<n-1;i++){
		if (kt(a,0,i) && kt(a,i,n)) {
			in(a,0,i);
			printf(" ");
			in(a,i,n);
			return 0;
		}
	}
}
}

#include<stdio.h>

int main ()
{
	int n,p,q;
	scanf("%d",&n);
    char str[n+1];
    int i,j,k;
	scanf("%s",str);
    for(i=0;i<n;i++)
    {
    	if(str[i]=='1')
    	{
    		p++;
		}
		else
		{
			q++;
		}
	}
    if(p==q)
    {
    	printf("2\n");
    	for(i=0;i<n-1;i++)
    	{
    		printf("%c",str[i]);
		}
		printf(" %c",str[n-1]);
	}
	else
	{
		printf("1\n");
    	for(i=0;i<n;i++)
    	{
    		printf("%c",str[i]);
		}
	}
    return 0;
}

#include<stdio.h>
int main()
{
    int n,i=0,j,count=0,result=0;
    scanf("%d",&n);
    char s[n+1];
    scanf("%s",&s);
    while(s[i]!=0)
    {
        if(s[i]=='1')
        {
            count=count+1;
        }
        else
        {
            result=result+1;
        }
        i=i+1;
    }
    if(count!=result)
    {
        printf("1\n");
        printf("%s",s);
    }
    else
    {
        printf("2\n");
        for(j=1;j<count;j=j+1)
        {
            printf("1");
        }
        for(j=1;j<=count;j=j+1)
        {
            printf("0");
        }
        printf(" ");
        printf("1\n");
    }
}

#include <stdio.h>
#include <stdlib.h>

int compare(const void *a, const void *b) {
	int ia = *(int *) a;
	int ib = *(int *) b;

	return ia - ib;
}

int main() {
	static char s[128];
	int n, i, cnt;

	scanf("%d%s", &n, s);
	cnt = 0;
	for (i = 0; i < n; i++)
		cnt += (s[i] - '0');
	if (cnt != n - cnt) {
		printf("1\n%s", s);
	} else {
		qsort(s, n, sizeof *s, compare);
		printf("2\n");
		for (i = 0; i < n / 2; i++)
			printf("%c", s[i]);
		printf(" ");
		for (i = n / 2; i < n; i++)
			printf("%c", s[i]);
	}
	printf("\n");
	return 0;
}

#include<stdio.h>
int main()
{
    int i,j,n,a,b,k,l,cnt=0,cmt=0;
    char s[101];
    scanf("%d",&n);
    scanf("%s",s);
    if(n%2==1) {
        printf("1\n");

            printf("%s\n",s);
    }
    else {
            for(k=0;k<n/2;k++)
            {
                if(s[k]=='0') cnt++;
                else cmt++;
            }
            if(cnt!=cmt) {
                printf("1\n");
                printf("%s\n",s);
            }
            else {
               printf("2\n");
        for(j=0;j<(n-1);j++)
            printf("%c",s[j]);
            printf(" ");
            printf("%c",s[n-1]);
        printf("\n");
            }

    }

    return 0;
}

#include<stdio.h>

int main(){
	int n;
	scanf("%d",&n);
	getchar();
	char a[1000];
	gets(a);
	int dem0=0,dem1=0,tmp=-1;
	if(n==1)
	printf("1\n%s",a);
	else if(n==2)
	printf("2\n%c %c",a[0],a[1]);
	else{
		printf("2\n");
		for(int i=0;i<n/2;i++){
			if(a[i]=='1'){
			tmp++;
			dem1++;
			}
			else{
			tmp++;
			dem0++;
		}
	}
	if(dem1==dem0)
	tmp++;
	for(int i=0;i<=tmp;i++){
		printf("%c",a[i]);
	}
	printf(" ");
	for(int i=tmp+1;i<n;i++){
		printf("%c",a[i]);
		}
	}
	return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int main() {
    char n[1000];
    int s,k;
    scanf("%d",&s);
    scanf("%s",&n);
    k=strlen(n);
    if (k%2==1)
        printf("1\n%s",n);
    else {
        printf("2\n%c ",n[0]);
        for (int i=1;i<s;i++){
            printf("%c",n[i]);
        }
    }

    return (EXIT_SUCCESS);
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
/*kneau reeves*/
int main() {
	int n,s1=0,s2=0,i;
	char ch[100];
	char sh[100];
    scanf("%d",&n);
    scanf("%s",ch);
	for (i=0;i<n;i++) {
		if (ch[i]='0')
		    s1+=1;
		else
		    s2+=1;
	}
	if (s1=s1)
	{

	  sh[1] = ch[n-1];
	  ch[n-1]='\0';
	  printf ("2\n%s",ch);
	  printf ("%c",sh);
}
    else
        printf("1\n%s",ch);
	return 0;

}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
/*kneau reeves*/
int main() {
	int n,s1=0,s2=0,i;
	char ch[100],sh[100];
    scanf("%d",&n);
    scanf("%s",ch);
	for (i=0;i<n;i++) {
		if (ch[i]=='0')
		    s1+=1;
		else
		    s2+=1;
	}
	if (s1!=s2) {
		printf("%d",1);
		printf("%s",ch);
    }
	else {
		for (i=0;i<n-1;i++) {
			sh[i]=ch[i];
		}
		sh[n]='\0';
		printf("%d\n",2);
		printf("%s %c",sh,ch[n-1]);
	}
	return 0;
}

#include<stdio.h>
#include<stdlib.h>

int main()
{
	int len,i,one=0,zero=0;
	char* str;
	char last,a;

	scanf("%d",&len);

	str=(char *)malloc(sizeof(char)*len);
	scanf("%c",&a);

	gets(str);

	for (i = 0; i < len; ++i)
	{
		if(str[i]=='1')
			one++;
		else
			zero++;
	}

	if(one!=zero)
	{
		printf("1\n%s",str);
		return 0;
	}
	else
	{
		for (i = 1; i < len; ++i)
		{
			last=str[len-i];
			str[len-i]=(char)32;
			printf("2\n%s%c",str,last);
		}

	}

}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned long long ll;
typedef long double LD;

#define MAXN 1000002

#ifndef ONLINE_JUDGE
#define DEBUG
#endif

#define MIN(a,b) (((a)<(b))?(a):(b))

char arr[101];

int main(void)
{
    int N;
    int i;
    int ones,zeroes;
	#ifndef ONLINE_JUDGE
	FILE * fp;
	fp = freopen("F:\\work\\trials\\codeforces\\1189\\A\\1189A.TXT","r",stdin);
	if (fp == NULL)
    {
        printf ("\n Cannot open File");
        exit (1);
    }
	#endif

    scanf("%d",&N);

    scanf("%s",arr);

    ones = 0;
    zeroes = 0;
    for (i=0; i<N; i++)
    {
        if (arr[i] == '0')
        {
            zeroes++;
        }
        else
        {
            ones++;
        }
    }

    if (ones != zeroes)
    {
        //good
        printf ("%s", arr);
    }
    else
    {
        printf ("%c %s",arr[0],arr+1);
    }

    return (0);
}

#include <stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
long long cmpfunc (const void * a, const void * b) {
   return ( *(long long*)a - *(long long*)b );
}

int main(void){

long long int test,i,j,n,count,flag=0,o1=0,o2=0,b1,x,m,l,max,sum2,min,f,c,r,o,sum1,sum=0,y,b,count1=0,a2,b2;
char a[1000000];
scanf("%lld%s",&n,a);
count=0;
for(i=0;i<n;i++){
    if(a[i]=='1' || i==n-1){
        count++;

   }
}
printf("%lld\n",count);
for(i=0;i<n;i++){
    if(a[i]=='1'){

    printf("%c ",a[i]);
    }else{
        printf("%c",a[i]);
    }
}
return 0;
}

#include <stdio.h>
#include<string.h>
int main()
{
	int n;
	scanf("%d",&n);
	char ara[n];
	scanf("%s",ara);
	int x=strlen(ara),one=0,zero=0;
	if (x%2==1){
        printf("1\n%s\n",ara);
	}
	else {
        for (int j =0; j<n; j++){
            if (ara[j]=='1')
                one++;
            else
                zero++;
        }
        if (one==zero){
            printf("2\n");
            for(int i=0; i<n; i++){
            if (i==n/2)
                printf(" ");
            printf("%c",ara[i]);
        }
        printf("\n");
        }
        else{
            printf("1\n%s\n",ara);
        }
	}
	return 0;
}

#include<stdio.h>
int main()
{
    int n,i;
    scanf("%d",&n);
    char s[n+1];
    scanf("%s",s);
    if(n>1){
    printf("2\n");
   for(i=0;i<n/2;i++)
    printf("%c",s[i]);
   printf(" ");
   for(i=n-n/2;i<n;i++)
    printf("%c",s[i]);
    }
    else
    {
        printf("1\n%s",s);
    }
}

#include <stdio.h>
#include <string.h>
int main()
{
    int i,j=0,n,k;
    char s[102];
    scanf("%d",&n);
    scanf("%s",s);
    if(n==1)
    {
        printf("%d\n",1);
        printf("%s",s);
    }
    else
    {

        for(i=0;i<n;i++)
    {
        if(s[i]=='0')
        j=j+1;

    }
    if(j==n-j)
    {
        printf("%d\n",1);
        printf("%s",s);

    }
    else
    {
       printf("%d\n",2);
        printf("%c ",s[0]);
        for(i=1;i<strlen(s);i++)
        {
            printf("%c",s[i]);
        }

    }

    }

    return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
    int n, i, j, sum, zero, one;

    scanf("%d", &n);

    char name[n];

    scanf(" %s", name);

    if(n%2 == 1)
    {

        printf("1\n%s\n", name);
    }
    else
    {

        sum = n/2;

        for(i=1; i<=sum; i++){

            printf("1");
        }

        printf(" ");

        for(i=1; i<=sum; i++){

            printf("0");
        }

        printf("\n");
    }

    return 0;

}

int main()
{
    char ch[100];
    char m;
    int n,i,one,zero;
    scanf("%d",&n);
    scanf("%s",ch);
    for (i=0;i<n;i++)
    {
        if(ch[i]=='0')
          zero+=1 ;
        else
          one+=1;
    }
    if (one==zero)
    {
     m=ch[n-1];
     ch[n-1]='\0';
     printf("2\n%s" ,ch);
     printf("%c",m);
    }
    else
     printf("1\n%s0",ch);

    return 0;
}

#include <stdio.h>
#include <stdlib.h>

int compare(const void *a, const void *b) {
	int ia = *(int *) a;
	int ib = *(int *) b;

	return ia - ib;
}

int main() {
	static char s[128];
	int n, i, cnt1, cnt2;

	scanf("%d%s", &n, s);
	cnt1 = 0;
	for (i = 0; i < n; i++)
		cnt1 += (s[i] - '0');
	cnt2 = 0;
	for (i = 0; i < n; i++)
		cnt2 += !(s[i] - '0');
	if (cnt1 != cnt2) {
		printf("1\n%s", s);
	} else {
		printf("2\n");
		for (i = 0; i < n / 2 && cnt1-- > 0; i++)
			printf("%c", s[i]);
		printf(" ");
		for (i = n / 2; i < n && cnt2-- > 0; i++)
			printf("%c", s[i]);
	}
	printf("\n");
	return 0;
}

#include<stdio.h>
int main()
{
    int n,i;
    scanf("%d",&n);
    char s[n+1];
    scanf("%s",s);
    printf("2\n");
   for(i=0;i<n/2;i++)
    printf("%c",s[i]);
   printf(" ");
   for(i=n/2;i<n;i++)
    printf("%c",s[i]);
}

#include <stdio.h>

int main(int argc, char const *argv[]) {
  int n, num1 = 0, num0 = 0, end;
  char s[105];
  scanf("%d", &n);
  scanf("%s", s);
  for (int i = 0; i < n; i++) {
    if (s[i]=='1')  num1 ++;
    else  num0 ++;
    end = i;
    if (num1 == num0 && i == n-1) {
        end = i - 1;
    }
  }
  if (num1 == num0) printf("2\n");
  else printf("1\n");
  for (int i = 0; i <= end; i++) {
    printf("%c", s[i]);
  }
  if (num1 == num0) printf(" ");
  for (int i = end+1; i <= n; i++) {
    printf("%c", s[i]);
  }
  printf("\n");

  return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int main() {
    char n[1000];
    long long s,k,l=0;
    scanf("%lld",&s);
    scanf("%s",&n);
    k=strlen(n);
    if (k%2==1)
        printf("1\n%s",n);
    else {
        for (int i=0;i<s;i++){
            if (n[i]==0)
                k++;
        }
        if (k!=(s/2))
            printf("1\n%s",n);
        else {
            printf("2\n%c ",n[0]);
        for (int i=1;i<s;i++){
            printf("%c",n[i]);
        }
        }
    }

    return (EXIT_SUCCESS);
}

#include<stdio.h>
int main()
{
    int n,i,j;
    scanf("%d",&n);
    char s[n+1];
    scanf("%s",s);
    if(n==1)
    printf("1\n");
    else
        printf("2\n");
    printf("%c ",s[0]);

    for(i=1;i<n;i++){
        printf("%c",s[i]);
    }
}

#include<stdio.h>
int main()
{
    int n,i;
    char s[105];
    scanf("%d",&n);
    scanf("%s",s);
    if(n==1)
    {
        printf("1\n%c\n",s[0]);
    }
    else
    {
        printf("2\n");
        for(i=0 ; i<n/2 ; i++)
            printf("%c",s[i]);
            printf(" ");
        for(i=i ; i<n ; i++)
            printf("%c",s[i]);
    }
    return 0;
}

#include <stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
long long cmpfunc (const void * a, const void * b) {
   return ( *(long long*)a - *(long long*)b );
}

int main(void){

long long int test,i,j,n,count,flag=0,o1=0,o2=0,b1,x,m,l,max,sum2,min,f,c,r,o,sum1,sum=0,y,b,count1=0,a2,b2;
char a[100000];
scanf("%lld%s",&n,a);
count=count1=0;
for(i=0;i<n;i++){
    if(a[i]=='0'){
        count++;
    }else{
        count1++;
    }
}
if(count==count1){
    printf("2\n");
    for(i=0;i<n-1;i++){
        printf("%c",a[i]);
    }
    printf(" %c",a[n-1]);
}else{
    printf("%s",a);
}
return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned long long ll;
typedef long double LD;

#define MAXN 1000002

#ifndef ONLINE_JUDGE
#define DEBUG
#endif

#define MIN(a,b) (((a)<(b))?(a):(b))

char arr[101];

int main(void)
{
    int N;
    int i;
    int ones,zeroes;
	/*#ifndef ONLINE_JUDGE
	FILE * fp;
	fp = freopen("F:\\work\\trials\\codeforces\\1189\\A\\1189A.TXT","r",stdin);
	if (fp == NULL)
    {
        printf ("\n Cannot open File");
        exit (1);
    }
	#endif*/

    scanf("%d",&N);

    scanf("%s",arr);

    ones = 0;
    zeroes = 0;
    for (i=0; i<N; i++)
    {
        if (arr[i] == '0')
        {
            zeroes++;
        }
        else
        {
            ones++;
        }
    }

    if (ones != zeroes)
    {
        //good
        printf ("%s\n", arr);
    }
    else
    {
        printf ("%c %s\n",arr[0],arr+1);
    }

    return (0);
}

#include <stdio.h>
#include<string.h>
int main()
{
	int n;
	scanf("%d",&n);
	char ara[n];
	scanf("%s",ara);
	int x=strlen(ara),one=0,zero=0;
	if (x%2==1){
        printf("1\n%s\n",ara);
	}
	else {
        for (int j =0; j<n; j++){
            if (ara[j]=='1')
                one++;
            else
                zero++;
        }
        if (one==zero){
            printf("2\n");
            for(int i=0; i<n; i++){
            if (i==((n/2)-1))
                printf(" ");
            printf("%c",ara[i]);
        }
        printf("\n");
        }
        else{
            printf("1\n%s\n",ara);
        }
	}
	return 0;
}

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>

int main(void) {

    int c;
    ptrdiff_t n;

    register ptrdiff_t i = 0;
    register int c0 = 0;

    while ((c = getchar()) && c != 10)
        n = n * 10 + c - 48;

    char* s = malloc(n * sizeof(char));

    while (i < n) {
        if (c == 48)
            c0 += 1;
        s[i++] = getchar();
    }

    if (n - c0 != c0) {
        putchar(50);
        putchar(10);
        putchar(*s);
        putchar(32);
        for (i = 1; i < n; i += 1) {
            putchar(*(s + i));
        }
    } else {
        putchar(49);
        putchar(10);
        for (i = 0; i < n; i += 1) {
            putchar(*(s + i));
        }
    }

    return 0;
}

#include<stdio.h>
int main(){
	int q=0;
	int n;
	scanf("%d", &n);
	char str[n+1];
	scanf("%s", str);
	int no1 = 0, no0=0;
	while(str[q]!='\0'){
		if(str[q]=='1')
			no1++;
		else
			no0++;
		q++;
	}
	q=0;
	int a=0, b=0;
	int fin=0;
	while(str[q]!='\0'){
		if(str[q]=='1')
			a++;
		else
			b++;
		if(a!=b){
			int rem1 = no1-a;
			int rem0 = no0 -b;
			if(rem1!=rem0){
				fin=q;
				break;
			}
		}
		q++;
	}
	if(n==1)
	printf("1\n");
	else
		printf("2\n");
	for(int i=0;i<=fin;i++)
			printf("%c ", str[i]);
	for(int i=fin+1;i<n;i++)
			printf("%c", str[i]);
	return 0;
}

#include <stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
long long cmpfunc (const void * a, const void * b) {
   return ( *(long long*)a - *(long long*)b );
}

int main(void){

long long int test,i,j,n,count,flag=0,o1=0,o2=0,b1,x,m,l,max,sum2,min,f,c,r,o,sum1,sum=0,y,b,count1=0,a2,b2;
char a[1000000];
scanf("%lld%s",&n,a);
printf("%lld",n);
for(i=0;i<n;i++){
    printf("%c ",a[i]);
}
return 0;
}

#include<stdio.h>
#include<string.h>
int kt(char a[],int k,int n){
	int cnt=0,cnt1=0;
	for(int i=k;i<n;i++){
		if (a[i]=='0') cnt++;
		else cnt1++;
	}
	if (cnt1==cnt) return 0;
	return 1;
}
void in(char a[],int k,int n){
	for (int i=k;i<n;i++){
		printf("%c",a[i]);
	}
}
int main(){
	int n;
	scanf("%d",&n);
	getchar();
	char a[1000];
	gets(a);

	if (n==1){
		printf("1\n%d",a[0]);
		return 0;
	}
	else if(n==2){
		printf("2\n%d %d",a[0],a[1]);
		return 0;
	}
	else {
		printf("2\n");
	for (int i=1;i<n-1;i++){
		if (kt(a,0,i) && kt(a,i,n)) {
			in(a,0,i);
			printf(" ");
			in(a,i,n);
			return 0;
		}
	}
}
}

#include<stdio.h>
#include<math.h>

int main(void)
{
	int n,str,str_ch,check,zero,one;
	scanf("%d",&n);
	scanf("%d",&str);
	if(n%2==1)
	{
		printf("1\n");
		printf("%d\n",str);
	}
	else
	{
		zero=one=0;
		str_ch=str;
		for(int i=0;i<n;i++)
		{
			check=str_ch%10;
			str_ch/=10;
			if (check==0)zero++;
			else one++;
		}
		if(one==zero)
		{
			printf("2\n%d %d",str/10,str%10);
		}
		else printf("1\n%d",str);
	}
	return 0;
}

#include <stdio.h>

int main(void)
{
 int n,ones=0,zeros=0;
 scanf("%d",&n);
 char  a[n];
 for(int i=0;i<n;i++)
 {
     scanf(" %c",&a[i]);
     if(a[i]=='1')
     ones++;
     else
     zeros++;
    // printf("%c\n",a[i]);
 }
 if(ones==zeros)
 {
     if(n>=2)
     {

     for(int i=0;i<2;i++)
     {
       printf("%c",a[i]);
     }
     printf(" ");
     for(int i=2;i<n;i++)
     {
         printf("%c",a[i]);
     }

     }
     else
     {
         for(int i=0;i<n;i++)
         {
             printf("%c",a[i]);
         }
     }
 }
 else
 {
     for(int i=0;i<n;i++)
     {
         printf("%c",a[i]);
     }
 }

}

    #include<stdio.h>
    int main()
    {
        int n,i,j,zero=0,one=0;
        char c;
        scanf("%d",&n);
        //printf("%d\n",n);
        scanf("%c",&c);
        char crr[n];
        int arr[n];
        int brr[n];
        for(i=0;i<n;i++)
        {
            scanf("%c",&crr[i]);
            if(crr[i]=='1')one++;
            if(crr[i]=='0')zero++;
            arr[i]=one;
            brr[i]=zero;
        }
        if(one==zero)
        {
        for(i=0;i<n;i++)
        {
            if(arr[i]!=brr[i])
            {
                if((one-arr[i])!=(zero-brr[i]))break;
            }
        }
        if(n!=1)printf("2\n");
        else printf("1\n");
        for(j=0;j<n;j++)
        {
            printf("%c",crr[j]);
            if(j==i && n!=1)printf(" ");
        }
        }
        else
        {
            for(j=0;j<n;j++)
            {
                printf("%c",crr[j]);
            }
        }
    }

#include<stdio.h>

int main()
{
    int n,m,l;
    scanf("%d",&n);
    char a[n+1];
    scanf("%s",a);
    if(n%2!=0)
    {
    printf("1\n");
    printf("%s",a);
    }
    else
    {
    printf("2\n");
    for(int i=0;i<strlen(a)-1;i++)
    printf("%c",a[i]);
    printf(" %c",a[strlen(a)-1]);
    }
    return 0;
}

#include<stdio.h>

int main ()
{
	int n,p,q;
	scanf("%d",&n);
    char str[n+1];
    int i,j,k;
	scanf("%s",str);
    for(i=0;i<n;i++)
    {
    	if(str[i]=='1')
    	{
    		p++;
		}
		else
		{
			q++;
		}
	}
    if(p==q)
    {
    	printf("2\n");
    	for(i=0;i<n-1;i++)
    	{
    		printf("%c",str[i]);
		}
		printf(" %c",str[n-1]);
	}
	else
	{
		printf("1\n");
    	for(i=0;i<n;i++)
    	{
    		printf("%c",str[i]);
		}
	}
    return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
    int n, i, j, sum, zero, one;

    scanf("%d", &n);

    char name[n];

    scanf(" %s", name);

    if(n%2 == 1)
    {

        printf("1\n%s\n", name);
    }
    else
    {

        sum = n/2;

        for(i=1; i<=sum; i++){

            printf("1");
        }

        printf(" ");

        for(i=1; i<=sum; i++){

            printf("0");
        }

        printf("\n");
    }

    return 0;

}

#include <stdio.h>
#include <stdlib.h>

int main()
{
   int n,i,c=0;
   scanf("%d",&n);
   char l[n+1];
   scanf("%s",l);
   for(i=0;i<n-1;i++){
   if(l[i]=='1')c++;
   }
   if(n%2==1 || c==n/2)printf("1\n%s",l);
   else {
   printf("2\n%c ",l[0]);
   for(i=1;i<n;i++)printf("%c",l[i]);
   }
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
/*kneau reeves*/
int main() {
	int n,s1=0,s2=0,i;
	char ch[100];
	char sh;
    scanf("%d",&n);
    scanf("%s",ch);
	for (i=0;i<n;i++) {
		if (ch[i]=='0') s1++ ;

		else
		    s2++;
	}
	if (s1==s2)
	{

	  sh = ch[n-1];
	  ch[n-1]='\0';
	  printf ("2\n%s",ch);
	  printf ("%c",sh);
}
    else
        printf("1\n%s",ch);
	return 0;

}

#include<stdio.h>
int main(void)
{
    int i,j,n,k=0,zero=0,one=0;
    scanf("%d",&n);
    char string[n+1];
    scanf("%s",string);
    for(i=0;string[i]!='\0';i++)
    {
        if(string[i]=='0')
            zero++;
        else
            one++;
    }
    if(one==0||zero==0)
        printf("%d\n",1);
    else
        printf("%d\n",2);
    for(i=0;i<one;i++)
        printf("1");
    printf(" ");
    for(i=0;i<zero;i++)
        printf("0");
    printf("\n");
    return 0;
}

#include<stdio.h>
int main()
{
    int n;
    scanf("%d",&n);
    int zero=0,one=0,i=0;
    //printf("INPUT:%d%d",i,n);
    char string[100];
    scanf("%s",string);
    while(i<n){
        //printf("%c cool",string[i]);
        if(string[i]-'0'==0)
            zero++;
        else
            one++;
        i=i+1;
    }
    //printf("INPUT DONE\n\n");
    if(zero!=one)
    {
        printf("1\n");
        printf("%s",string);
    }
    else if((n/2)%2==0)
    {
        printf("2\n");
        printf("%c ",string[0]);
        int i=1;
        while(i<n)
        {
            printf("%c",string[i]);
            i=i+1;
        }
    }
    else if((n/2)%2==1)
    {
        int i=0;
        printf("2\n");
        while(i<n/2)
        {
              printf("%c",string[i]);
              i=i+1;
        }
        printf(" ");
        while(i<=n)
        {
              printf("%c",string[i]);
              i=i+1;
        }
    }
return 0;
}

#include<stdio.h>
#include<string.h>
int main(){

  int n,i,j,k,ct=0,ck=0;
  char a[10000];
  scanf("%d %s",&n,&a);
  for(i=0;i<n;i++){
       if(a[i]==0){
        ct++;
       }
       else{
        ck++;
       }
    }
    if(ck==0||ct==0){
        printf("1\n");
        printf("%s",a);
    }
  else if(n%2==0){
    printf("2\n");
    for(i=0;i<n-1;i++){
        printf("%c",a[i]);
    }
    printf(" %c", a[n-1]);
  }
  else{
        printf("1\n");
    printf("%s",a);
  }

 return 0;
}

#include<stdio.h>
int main()
{
    int n,i=0,j,count=0,result=0;
    scanf("%d",&n);
    char s[n+1];
    scanf("%s",&s);
    while(s[i]!=0)
    {
        if(s[i]=='1')
        {
            count=count+1;
        }
        else
        {
            result=result+1;
        }
        i=i+1;
    }
    if(count!=result)
    {
        printf("1\n");
        printf("%s",s);
    }
    else
    {
        printf("2\n");
        for(j=1;j<count;j=j+1)
        {
            printf("1");
        }
        for(j=1;j<=count;j=j+1)
        {
            printf("0");
        }
        printf(" ");
        printf("1\n");
    }
}


# include <stdio.h>
int dp[50];

int f(int n)
{
	if(dp[n]!=-1)
		return dp[n];
	else if(n==1)
		return dp[1];
	else if(n==0)
		return dp[0];
	else
	{
		dp[n]=f(n-1)+f(n-2);
		return dp[n];
	}
}

int main(void)
{
	int n;
	int i;
	scanf("%d %d %d", &dp[0],&dp[1],&n);
	for(i=2; i<=n; ++i)
		dp[i]=-1;
	printf("%d", f(n));
	return 0;
}

#include<stdio.h>
int main()
{
    long long a1,a2,a3;//定义a1、a2、a3
    long long d[1000];//定义一个指针
    scanf("%lld%lld%lld",&a1,&a2,&a3);//输入a1、a2、a3
    d[0]=a1;//第1项为a1
    d[1]=a2;//第2项为a2
    for(int i=2;i<=a3;++i)//从下标为2的元素开始遍历
    d[i]=d[i-1]+d[i-2];//这是递推公式
    printf("%lld",d[a3]);//最后输出第a3项
    return 0;
}

#include<stdio.h>
#define FOR(a, b, c) for(int a=b; a<=c; a++)

int m1, m2, n, f[25];

int main()
{
    scanf("%d %d %d", &m1, &m2, &n);
    f[0] = m1;
    f[1] = m2;
    FOR(i, 2, n)
        f[i] = f[i-1] + f[i-2];
    printf("%d", f[n]);
    return 0;
}

#include <stdio.h>////───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
#include <stdlib.h>///───█▒▒░░░░░░░░░▒▒█───
#include <math.h>/////────█░░█░░░░░█░░█────
#include <string.h>///─▄▄──█░░░▀█▀░░░█──▄▄─
#include <ctype.h>////█░░█─▀▄░░░░░░░▄▀─█░░█
#define max(a,b) (a)>(b)?(a):(b)
#define min(a,b) (a)<(b)?(a):(b)
#define inout freopen("in.txt","r",stdin);freopen("out.txt","w",stdout)
#define swap(a,b) a+=b;b=a-b;a-=b
#define quicksort(a,n) qsort(a,n,sizeof(a[0]),cmp)
#define inputarr(a,n)for(int i=0;i<n;i++){scanf("%d",&a[i]);}
#define printarr(a,n) for(int i=0;i<n;i++){printf("%d ",a[i]);}puts("")
#define ll long long
int cmp(const void *a,const void *b){return *(int *)a - *(int *)b;}

int main() {

	//inout;

	int a, b, i;

	scanf("%d %d %d", &a, &b, &i);

	if(i == 0){printf("%d", a); return 0;}
	else if(i == 1){printf("%d", b);return 0;}

	else{
		i --;
		while(i--){
			int temp = b;
			b = a + b;
			a = temp;
		}
		printf("%d", b);
	}

}

#include<stdio.h>
int f[20];
int main(void)
{
	int a1, a2, n;
	scanf("%d%d%d", &f[0], &f[1], &n);
	for(int i=2; i<=n; i++)
	{
		f[i] = f[i-1] + f[i-2];
	}
	printf("%d", f[n]);
	return 0;
}

#include<stdio.h>
int main(){
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    int n;
    for(int i=2;i<=c;i++){
        n=a+b;
        a=b;
        b=n;
    }
    printf("%d",b);
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int f[10000];
    int n,i,j,a1,a2,x;
    scanf("%d%d%d",&a1,&a2,&x);
    f[0]=a1;f[1]=a2;
    for(i=2;i<=x;i++)
        f[i]=f[i-1]+f[i-2];
    printf("%d",f[x]);
    return 0;
}

#include<stdio.h>
int main(){
	int fib[40],k,i;
	scanf("%d%d%d",&fib[0],&fib[1],&k);
	if(k<2){ printf("%d",fib[k]); return 0;}
	for(i=2;1;i++){
		fib[i]=fib[i-1]+fib[i-2];
		if(i==k){
			printf("%d\n",fib[k]);
			return 0;
		}
	}
	return 0;
}

#include<stdio.h>
int main()
{
  int a,b,c,arr[100],tot,i,j;
  for(i=0;i<3;i++)
  scanf("%d",&arr[i]);
  c=arr[2];
  for(i=2;i<=c;i++)
  arr[i]=arr[i-1]+arr[i-2];
  printf("%d\n",arr[c]);
  return 0;
}

#include<stdio.h>
int main()
{
    int a,b,c,n,i;
    scanf("%d%d%d",&a,&b,&n);
    if(n==0)
    printf("%d\n",a);
    else if(n==1)
    printf("%d\n",b);
    else
    {for(i=2;i<=n;i++)
    {
        c=a+b;
        a=b;
        b=c;
    }
    printf("%d\n",c);}
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAX 100
int main()
{
   int cases,cnt;
   int i,n;
   int a[MAX];
      scanf("%d",&a[0]);
      scanf("%d",&a[1]);
      scanf("%d",&n);
      for(i=2;i<=n;i++)
         a[i]=a[i-1]+a[i-2];
      printf("%d\n",a[n]);
   return 0;
}

#include <stdio.h>
#define in scanf
#define out printf

int main() {
  int a0, a1, n, r;
  in("%d %d %d", &a0, &a1, &n);

  if (n == 0) r = a0;
  else if (n == 1) r = a1;
  else while (--n) r = a0+a1, a0 = a1, a1 = r;

  out("%d\n", r);
  return 0;
}

#include<stdio.h>
int a,b,c,d,n;
int main()
{
                 scanf("%d %d %d",&a,&b,&c);
                 for(d=0;d<c-1;d++){
                     b+=a;
                     a=b-a;
                 }
                 printf("%d",b);
                 scanf(" ");
                 return 0;
}

#include<stdio.h>
int main()
{
    int a,b,i,s;
    scanf("%d%d%d",&a,&b,&i);
    while(i>1)
    {
              s=a+b;
              a=b;
              b=s;
              i--;
    }
    printf("%d",b);
    return 0;
}

#include "stdio.h"

int a, b, c, n;

int main()
{
	scanf( "%d%d%d", &a, &b, &n );
	while( n-- ) c = a + b, a = b, b = c;
	printf( "%d\n", a );
	return 0;
}

#include <stdio.h>
int balchal(int a,int b,int c)
{
	//int i;
	if (c==0){
		return a;
	}
	else if (c==1){
		return b;
	}
	else{
		return balchal(a,b,c-1)+balchal(a,b,c-2);
	}

}
int main()
{
	int a,b,c,g;
	scanf("%d %d %d",&a,&b,&c);
	g=balchal(a,b,c);
	printf("%d",g);
	return 0;
}

/*  AUTHOR:AKASH JAIN
*   USERNAME:akash19jain
*   DATE:31/03/2019
*/
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>

int main()
{
    long long t=1;
    //scanf("%lld",&t);
    while(t--)
    {
       long long a,b,c,ans=b;
       scanf("%lld%lld%lld",&a,&b,&c);
       ans=b;
       for(int i=2;i<=c;i++)
       {
           ans=a+b;
           a=b;
           b=ans;
       }
       printf("%lld",ans);
    }

    return 0;
}

#include <stdio.h>

int arr[25];

int main()
{
    int a1, a2, a3;
    scanf("%d %d %d", &a1, &a2, &a3);
    if(a3 == 0)
    {
        printf("%d\n", a1);
    }
    else if(a3 == 1)
    {
        printf("%d\n", a2);
    }
    else
    {
        arr[0] = a1;
        arr[1] = a2;
        for(int i = 2; i <= a3; i++)
        {
            arr[i] = arr[i - 1] + arr[i - 2];
        }
        printf("%d\n", arr[a3]);
    }
    return 0;
}

#include<stdio.h>
    int f(int x,int y,int n)
    {
        if(n==1) return x;
        else if(n==2)  return y;
        else return f(x,y,n-1)+f(x,y,n-2);
    }
    int main()
    {
        int m,n,a;
        scanf("%d %d %d",&m,&n,&a);
        printf("%d\n",f(m,n,a+1));
        return 0;
    }

#include<stdio.h>
int main()
{
  int a,b,c,arr[3],tot,i,j;
  for(i=0;i<3;i++)
  scanf("%d",&arr[i]);
  i=1;tot=0;j=1;
  while((arr[2])--)
  {
    tot=tot+arr[j];
    i++;
    j=i%2;
  }
  printf("%d\n",tot);
  return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a1,a2,n,i;
    scanf("%d %d %d",&a1,&a2,&n);
    int a[1000];
    a[0]=a1;
    a[1]=a2;
    for(i=2;i<=n;i++)
        a[n]=a[n-1]+a[n-2];
    printf("%d",a[n]);
    return 0;
}

#include<stdio.h>
int main(){
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    int n;
    for(int i=3;i<=c;i++){
        n=a+b;
        a=b;
        b=n;
    }
    if(c==1)printf("%d",a);
    else printf("%d",b);
}