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

void printDistinct(int arr[], int n)
{
    int i;
    int j;
    int count = 0;
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < i; j++)
        {
            if (arr[i] == arr[j])
                break;
                count++;
        }
    }
    cout << count << endl;
    for(i = 0; i < n; i++)
    {
        for (j = 0; j < i; j++)
        {
            if (arr[i] == arr[j])
                break;
        }
        if(i == j)
            cout << arr[i] << " ";
    }

}

int main()
{
    int arr[3];
    for(int i = 0; i < 3; i++)
    {
        cin >> arr[i];
    }
    int n = sizeof(arr)/sizeof(arr[0]);
    printDistinct(arr, n);
    return 0;
}
