import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.TreeMap;
import java.util.ArrayDeque;
import java.awt.Point;
 
class Main{
    public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        
        for(int i=1; i<=5; i++) {
            if(sc.nextInt()==0) {
                System.out.println(i);
            }
        }
    } 
} import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.HashMap; HashMap java.util import java.util.TreeMap; TreeMap java.util import java.util.ArrayDeque; ArrayDeque java.util import java.awt.Point; Point java.awt class Main{
    public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        
        for(int i=1; i<=5; i++) {
            if(sc.nextInt()==0) {
                System.out.println(i);
            }
        }
    } 
} Main public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        
        for(int i=1; i<=5; i++) {
            if(sc.nextInt()==0) {
                System.out.println(i);
            }
        }
    } main {
        
        Scanner sc = new Scanner(System.in);
        
        for(int i=1; i<=5; i++) {
            if(sc.nextInt()==0) {
                System.out.println(i);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(int i=1; i<=5; i++) {
            if(sc.nextInt()==0) {
                System.out.println(i);
            }
        } int i=1; int i=1; i 1 i<=5 i 5 i++ i++ i {
            if(sc.nextInt()==0) {
                System.out.println(i);
            }
        } {
            if(sc.nextInt()==0) {
                System.out.println(i);
            }
        } if(sc.nextInt()==0) {
                System.out.println(i);
            } sc.nextInt()==0 sc.nextInt() sc.nextInt sc 0 {
                System.out.println(i);
            } System.out.println(i) System.out.println System.out System System.out i String[] args args
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.TreeMap;
import java.util.ArrayDeque;
import java.awt.Point;
 
class Main{
    public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        
        for(int i=1; i<=5; i++) {
            if(sc.nextInt()==0) {
                System.out.println(i);
            }
        }
    } 
}