import java.util.*;
public class Main {
    private static long dp[][];
    private static int N;
    private static int A[];
    private static int B[];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int T = sc.nextInt() * 1000;
        int A = sc.nextInt() * 1000;
        int H[] = new int[N];
        for(int i=0; i<N; i++) {
            H[i] = sc.nextInt();
        }

        int X[] = new int[N];
        for(int i=0; i<N; i++) {
            X[i] = Math.abs((T - H[i] * 6) - A);
        }

        int res = 0;
        int minval = X[0];
        for(int i=0; i<N; i++) {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        }
        System.out.println(String.format("%d", res + 1));
    }
} import java.util.*; util.* java public class Main {
    private static long dp[][];
    private static int N;
    private static int A[];
    private static int B[];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int T = sc.nextInt() * 1000;
        int A = sc.nextInt() * 1000;
        int H[] = new int[N];
        for(int i=0; i<N; i++) {
            H[i] = sc.nextInt();
        }

        int X[] = new int[N];
        for(int i=0; i<N; i++) {
            X[i] = Math.abs((T - H[i] * 6) - A);
        }

        int res = 0;
        int minval = X[0];
        for(int i=0; i<N; i++) {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        }
        System.out.println(String.format("%d", res + 1));
    }
} Main private static long dp[][]; dp private static int N; N private static int A[]; A private static int B[]; B public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int T = sc.nextInt() * 1000;
        int A = sc.nextInt() * 1000;
        int H[] = new int[N];
        for(int i=0; i<N; i++) {
            H[i] = sc.nextInt();
        }

        int X[] = new int[N];
        for(int i=0; i<N; i++) {
            X[i] = Math.abs((T - H[i] * 6) - A);
        }

        int res = 0;
        int minval = X[0];
        for(int i=0; i<N; i++) {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        }
        System.out.println(String.format("%d", res + 1));
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int T = sc.nextInt() * 1000;
        int A = sc.nextInt() * 1000;
        int H[] = new int[N];
        for(int i=0; i<N; i++) {
            H[i] = sc.nextInt();
        }

        int X[] = new int[N];
        for(int i=0; i<N; i++) {
            X[i] = Math.abs((T - H[i] * 6) - A);
        }

        int res = 0;
        int minval = X[0];
        for(int i=0; i<N; i++) {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        }
        System.out.println(String.format("%d", res + 1));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int T = sc.nextInt() * 1000; T sc.nextInt() * 1000 sc.nextInt() sc.nextInt sc 1000 int A = sc.nextInt() * 1000; A sc.nextInt() * 1000 sc.nextInt() sc.nextInt sc 1000 int H[] = new int[N]; H new int[N] N for(int i=0; i<N; i++) {
            H[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            H[i] = sc.nextInt();
        } {
            H[i] = sc.nextInt();
        } H[i] = sc.nextInt() H[i] H i sc.nextInt() sc.nextInt sc int X[] = new int[N]; X new int[N] N for(int i=0; i<N; i++) {
            X[i] = Math.abs((T - H[i] * 6) - A);
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            X[i] = Math.abs((T - H[i] * 6) - A);
        } {
            X[i] = Math.abs((T - H[i] * 6) - A);
        } X[i] = Math.abs((T - H[i] * 6) - A) X[i] X i Math.abs((T - H[i] * 6) - A) Math.abs Math (T - H[i] * 6) - A (T - H[i] * 6) T H[i] * 6 H[i] H i 6 A int res = 0; res 0 int minval = X[0]; minval X[0] X 0 for(int i=0; i<N; i++) {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        } {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        } if(minval > X[i]) {
                minval = X[i];
                res = i;
            } minval > X[i] minval X[i] X i {
                minval = X[i];
                res = i;
            } minval = X[i] minval X[i] X i res = i res i System.out.println(String.format("%d", res + 1)) System.out.println System.out System System.out String.format("%d", res + 1) String.format String "%d" res + 1 res 1 String[] args args public class Main {
    private static long dp[][];
    private static int N;
    private static int A[];
    private static int B[];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int T = sc.nextInt() * 1000;
        int A = sc.nextInt() * 1000;
        int H[] = new int[N];
        for(int i=0; i<N; i++) {
            H[i] = sc.nextInt();
        }

        int X[] = new int[N];
        for(int i=0; i<N; i++) {
            X[i] = Math.abs((T - H[i] * 6) - A);
        }

        int res = 0;
        int minval = X[0];
        for(int i=0; i<N; i++) {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        }
        System.out.println(String.format("%d", res + 1));
    }
} public class Main {
    private static long dp[][];
    private static int N;
    private static int A[];
    private static int B[];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int T = sc.nextInt() * 1000;
        int A = sc.nextInt() * 1000;
        int H[] = new int[N];
        for(int i=0; i<N; i++) {
            H[i] = sc.nextInt();
        }

        int X[] = new int[N];
        for(int i=0; i<N; i++) {
            X[i] = Math.abs((T - H[i] * 6) - A);
        }

        int res = 0;
        int minval = X[0];
        for(int i=0; i<N; i++) {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        }
        System.out.println(String.format("%d", res + 1));
    }
} Main
import java.util.*;
public class Main {
    private static long dp[][];
    private static int N;
    private static int A[];
    private static int B[];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int T = sc.nextInt() * 1000;
        int A = sc.nextInt() * 1000;
        int H[] = new int[N];
        for(int i=0; i<N; i++) {
            H[i] = sc.nextInt();
        }

        int X[] = new int[N];
        for(int i=0; i<N; i++) {
            X[i] = Math.abs((T - H[i] * 6) - A);
        }

        int res = 0;
        int minval = X[0];
        for(int i=0; i<N; i++) {
            if(minval > X[i]) {
                minval = X[i];
                res = i;
            }
        }
        System.out.println(String.format("%d", res + 1));
    }
}
