#include <iostream>
using namespace std;
int main() {
int N=0,k=0;
while (N != 12) {
cin >> N;
if (N > 0 && N != 12) {
k++;
}
cout << k;
return 0;
#include <iostream>
using namespace std;
int main() {
int N=0,k=0;
while (N != 12) {
cin >> N;
if (N > 0 && N != 12) {
k++;
}
}
cout << k;
return 0;
}