#include <iostream>
using namespace std;
int main() {
// Номер мобильного телефона
int c, count = 0;
int n[] = {0,0,0,0,0,0,0,0,0,0};
while ((c = cin.get()) != EOF) {
n[c - 48]++;
}
for (int i = 0; i < 10; i++) {
if (n[i] == 0) count++;
}
cout << count << "\n";
for (int i = 0; i < 10; i++) {
if (n[i] == 0) cout << i << " ";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyDQndC+0LzQtdGAINC80L7QsdC40LvRjNC90L7Qs9C+INGC0LXQu9C10YTQvtC90LAKCWludCBjLCBjb3VudCA9IDA7CglpbnQgbltdID0gezAsMCwwLDAsMCwwLDAsMCwwLDB9OwoJd2hpbGUgKChjID0gY2luLmdldCgpKSAhPSBFT0YpIHsKCQluW2MgLSA0OF0rKzsKCX0KCWZvciAoaW50IGkgPSAwOyBpIDwgMTA7IGkrKykgewoJCWlmIChuW2ldID09IDApIGNvdW50Kys7Cgl9Cgljb3V0IDw8IGNvdW50IDw8ICJcbiI7Cglmb3IgKGludCBpID0gMDsgaSA8IDEwOyBpKyspIHsKCQlpZiAobltpXSA9PSAwKSBjb3V0IDw8IGkgPDwgIiAiOwoJfQoJcmV0dXJuIDA7Cn0=