#include<stdio.h>intmain(){int a[8];longlong i, c;
c =0;while(a[i]>=12345678&& a[i]<=98765432){for(i =0; i <=7; i++){if(a[i]==4){
i = i +1;if(a[i]==3){
i = i +1;if(a[i]==9){
i = i +1;if(a[i]==6){
i = i +1;}}}}else
c = c +1;}}printf("lld", c);return0;}