#include #define F(i,n) for(int i = 0;i < n;i++) void x(const int a[],int b[],int n){ int c[10] = {0};int ct = 0;F(i,n){c[a[i]]++;}F(i,10){if(c[i] != 0){for(int i2 = 0;i2 < c[i];i2++){b[ct] = i;ct++;}}} } int main (void){ int a[9];F(i,9) scanf("%d",&a[i]);x(a,a,9);F(i,9){if(a[i] != i+1){printf("%d\n",i+1); break;}} return(0); }