//* Problem  : 1189 - Pairs of integers
//* Contest  : acm.timus.ru
//* Type     : Solution
//* Date     : 2007.11.10
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0
//* Algo     : Backtracking

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

int n, res, r[1000];

int num1[12];
int num2[12];
int nn[12];

int len(int n)
{
	int res = 0;
	while (n)
	{
		n /= 10; 
		res++;
	}
	if (!res) res = 1;
	return res;
}

int is_solution(int k1, int k2)
{
	if (len(k1) <= len(k2)) return 0;
	char s1[20], s2[20];
	sprintf(s1, "%012d", k1);
	sprintf(s2, "%011d", k2);
	int f = 0;
	int i;
	for (i = 0; s2[i]; i++)
		if (s1[i + f] != s2[i])
		{
			if (f) return 0;
			f = 1;
			if (s2[i] != s1[i + f]) return 0;
		}
	return f || (s1[i] && !s1[i+1]);
}

void check(int pos, int flag, int carry)
{
	if (carry || !flag) return;
	int n1 = 0, n2 = 0;
	for (int i = 10; i >= 0; i--)
	{
		n1 = n1 * 10 + num1[i];
		n2 = n2 * 10 + num2[i];
	}
	if (n1 < 0 || n2 < 0 || n1 > n || n2 > n || n1 <= n/2) return ;
	if (is_solution(n1, n2))
		r[res++] = n1;
}

void recurse(int pos, int flag, int carry)
{
	int k;
	if (pos == 10) check(pos, flag, carry);
		else for (num1[pos+1] = 0; num1[pos+1] < 10; num1[pos+1]++)
		{
			num2[pos] = num1[pos + flag];
			k = num2[pos] + num1[pos] + carry;
			if (k % 10 == nn[pos])
				recurse(pos + 1, flag, k / 10);
			if (!flag)
			{
				num2[pos] = num1[pos + 1];
				k = num2[pos] + num1[pos] + carry;
				if (k % 10 == nn[pos])
					recurse(pos + 1, 1, k / 10);
			}
		}
}


void solve(int n, int *res, int r[])
{
	int pos = 0;
	while (n)
	{
		nn[pos++] = n % 10;
		n /= 10;
	}
	for (num1[0] = 0; num1[0] < 10; num1[0]++)
		recurse(0, 0, 0);
}


void solve_dumb(int n, int *res, int r[])
{
	int c = 0; int lenn = len(n);
	char s[100], st[100];
	for (int i = 1; i <= n; i++)
	{
		sprintf(s, "%d\0", i);
		int leni = strlen(s);
		for (int j = 0; j < lenn; j++)
		{
			int t;
			for (t = 0; t < j; t++)
				st[t] = s[t];
			for (t = j + 1; t < lenn; t++)
				st[t - 1] = s[t];
			st[leni] = 0;
			int k;
			if (sscanf(st, "%d", &k) != 1) continue;
			if (k + i == n && leni == strlen(st) + 1)
			{
				r[c++] = i;
				break;
			}
		}
	}
	*res = c;
}

int cmp_f(const void *a, const void *b)
{
	return ((int*)a)[0] - ((int*)b)[0];
}

void result()
{
	qsort(r, res, 4, cmp_f);
	int tres = 0, i;
	if (res) tres = 1;
	for (i = 1; i < res; i++)
		if (r[i] != r[i-1]) tres++;
	const char fstr[] = "%%d + %%0%dd = %%d\n";
	char fstr2[100]; 
	printf("%d\n", tres);
	for (i = 0; i < res; i++)
		if (r[i] != r[i-1])
		{
			sprintf(fstr2, fstr, len(r[i]) - 1);
			printf(fstr2, r[i], n - r[i], n);
		}
}



int main()
{
	scanf("%d", &n);
	solve(n, &res, r);
	result();
	return 0;
}

