#include <iostream>
using namespace std ;
int main (){
int A[8],m=0;
for (int i = 0 ; i<8;i++){
cin << A[i];
if (A[i]>0){
m+=1;
}
cout << endl <<m ;
return 0 ;
#include <iostream>
using namespace std ;
int main (){
int A[8],m=0;
for (int i = 0 ; i<8;i++){
cin << A[i];
if (A[i]>0){
m+=1;
}
}
cout << endl <<m ;
return 0 ;
}