import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] X = new int[5];

        for (int i = 0; i < 5; i++) {
            X[i] = sc.nextInt();
        }
        sc.close();

        for (int i = 0; i < 5; i++) {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        }
        return;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] X = new int[5];

        for (int i = 0; i < 5; i++) {
            X[i] = sc.nextInt();
        }
        sc.close();

        for (int i = 0; i < 5; i++) {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        }
        return;
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] X = new int[5];

        for (int i = 0; i < 5; i++) {
            X[i] = sc.nextInt();
        }
        sc.close();

        for (int i = 0; i < 5; i++) {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        }
        return;
    } main {
        Scanner sc = new Scanner(System.in);
        int[] X = new int[5];

        for (int i = 0; i < 5; i++) {
            X[i] = sc.nextInt();
        }
        sc.close();

        for (int i = 0; i < 5; i++) {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        }
        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] X = new int[5]; X new int[5] 5 for (int i = 0; i < 5; i++) {
            X[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < 5 i 5 i++ i++ i {
            X[i] = sc.nextInt();
        } {
            X[i] = sc.nextInt();
        } X[i] = sc.nextInt() X[i] X i sc.nextInt() sc.nextInt sc sc.close() sc.close sc for (int i = 0; i < 5; i++) {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        } int i = 0; int i = 0; i 0 i < 5 i 5 i++ i++ i {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        } {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        } if (X[i] == 0) {
                System.out.println(i + 1);
            } X[i] == 0 X[i] X i 0 {
                System.out.println(i + 1);
            } System.out.println(i + 1) System.out.println System.out System System.out i + 1 i 1 return; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] X = new int[5];

        for (int i = 0; i < 5; i++) {
            X[i] = sc.nextInt();
        }
        sc.close();

        for (int i = 0; i < 5; i++) {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        }
        return;
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] X = new int[5];

        for (int i = 0; i < 5; i++) {
            X[i] = sc.nextInt();
        }
        sc.close();

        for (int i = 0; i < 5; i++) {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        }
        return;
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int[] X = new int[5];

        for (int i = 0; i < 5; i++) {
            X[i] = sc.nextInt();
        }
        sc.close();

        for (int i = 0; i < 5; i++) {
            if (X[i] == 0) {
                System.out.println(i + 1);
            }
        }
        return;
    }
}
