import java.util.Objects;
import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
        final int p = 3;
        switch (p) {
        case 1:
            P1.p1();
            break;
        case 2:
            P2.answer();
            break;
        case 3:
            P3.answer();
            break;
        }
    }
}

class P3 {
    static void answer() {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = sc.nextInt();
        }
        final int res = calc(array);
        System.out.println(res);
    }

    static int calc(final int[] array) {
        int max = 0;
        for (int i = 0; i < array.length; i++) {
            if (max > array.length - i) {
                break;
            }
            final int res = measure(array, i);
            max = Math.max(res, max);
        }
        return max;
    }

    private static int measure(final int[] array, final int pos) {
        int times = 0;
        for (int i = pos; i < array.length - 1; i++) {
            if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            }
        }
        return times;
    }

}

class P2 {
    static void answer() {
        final Scanner sc = new Scanner(System.in);
        final int a = sc.nextInt();
        final int b = sc.nextInt();
        final int res = calc(a, b);
        System.out.println(res);
    }

    static int calc(final int a, final int b) {
        final int per = a - 1;
        final int remain = b - 1;
        final int x = remain / per;
        if (remain - (per * x) > 0) {
            return x + 1;
        }
        return x;
    }
}

class P1 {

    static void p1() {
        final Scanner sc = new Scanner(System.in);
        final String yohou = sc.nextLine();
        final String jissai = sc.nextLine();

        final int res = calc(yohou, jissai);
        System.out.println(res);
    }

    static int calc(final String yohou, final String kekka) {
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            }
        }
        return res;
    }
} import java.util.Objects; Objects java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(final String[] args) {
        final int p = 3;
        switch (p) {
        case 1:
            P1.p1();
            break;
        case 2:
            P2.answer();
            break;
        case 3:
            P3.answer();
            break;
        }
    }
} Main public static void main(final String[] args) {
        final int p = 3;
        switch (p) {
        case 1:
            P1.p1();
            break;
        case 2:
            P2.answer();
            break;
        case 3:
            P3.answer();
            break;
        }
    } main {
        final int p = 3;
        switch (p) {
        case 1:
            P1.p1();
            break;
        case 2:
            P2.answer();
            break;
        case 3:
            P3.answer();
            break;
        }
    } final int p = 3; p 3 switch (p) {
        case 1:
            P1.p1();
            break;
        case 2:
            P2.answer();
            break;
        case 3:
            P3.answer();
            break;
        } p case 1: 1 case 1: P1.p1() P1.p1 P1 break; case 2: 2 case 2: P2.answer() P2.answer P2 break; case 3: 3 case 3: P3.answer() P3.answer P3 break; final String[] args args class P3 {
    static void answer() {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = sc.nextInt();
        }
        final int res = calc(array);
        System.out.println(res);
    }

    static int calc(final int[] array) {
        int max = 0;
        for (int i = 0; i < array.length; i++) {
            if (max > array.length - i) {
                break;
            }
            final int res = measure(array, i);
            max = Math.max(res, max);
        }
        return max;
    }

    private static int measure(final int[] array, final int pos) {
        int times = 0;
        for (int i = pos; i < array.length - 1; i++) {
            if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            }
        }
        return times;
    }

} P3 static void answer() {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = sc.nextInt();
        }
        final int res = calc(array);
        System.out.println(res);
    } answer {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = sc.nextInt();
        }
        final int res = calc(array);
        System.out.println(res);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc final int[] array = new int[n]; array new int[n] n for (int i = 0; i < n; i++) {
            array[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            array[i] = sc.nextInt();
        } {
            array[i] = sc.nextInt();
        } array[i] = sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc final int res = calc(array); res calc(array) calc array System.out.println(res) System.out.println System.out System System.out res static int calc(final int[] array) {
        int max = 0;
        for (int i = 0; i < array.length; i++) {
            if (max > array.length - i) {
                break;
            }
            final int res = measure(array, i);
            max = Math.max(res, max);
        }
        return max;
    } calc {
        int max = 0;
        for (int i = 0; i < array.length; i++) {
            if (max > array.length - i) {
                break;
            }
            final int res = measure(array, i);
            max = Math.max(res, max);
        }
        return max;
    } int max = 0; max 0 for (int i = 0; i < array.length; i++) {
            if (max > array.length - i) {
                break;
            }
            final int res = measure(array, i);
            max = Math.max(res, max);
        } int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
            if (max > array.length - i) {
                break;
            }
            final int res = measure(array, i);
            max = Math.max(res, max);
        } {
            if (max > array.length - i) {
                break;
            }
            final int res = measure(array, i);
            max = Math.max(res, max);
        } if (max > array.length - i) {
                break;
            } max > array.length - i max array.length - i array.length array array.length i {
                break;
            } break; final int res = measure(array, i); res measure(array, i) measure array i max = Math.max(res, max) max Math.max(res, max) Math.max Math res max return max; max final int[] array array private static int measure(final int[] array, final int pos) {
        int times = 0;
        for (int i = pos; i < array.length - 1; i++) {
            if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            }
        }
        return times;
    } measure {
        int times = 0;
        for (int i = pos; i < array.length - 1; i++) {
            if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            }
        }
        return times;
    } int times = 0; times 0 for (int i = pos; i < array.length - 1; i++) {
            if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            }
        } int i = pos; int i = pos; i pos i < array.length - 1 i array.length - 1 array.length array array.length 1 i++ i++ i {
            if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            }
        } {
            if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            }
        } if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            } array[i] >= array[i + 1] array[i] array i array[i + 1] array i + 1 i 1 {
                times++;
            } times++ times {
                break;
            } break; return times; times final int[] array array final int pos pos class P2 {
    static void answer() {
        final Scanner sc = new Scanner(System.in);
        final int a = sc.nextInt();
        final int b = sc.nextInt();
        final int res = calc(a, b);
        System.out.println(res);
    }

    static int calc(final int a, final int b) {
        final int per = a - 1;
        final int remain = b - 1;
        final int x = remain / per;
        if (remain - (per * x) > 0) {
            return x + 1;
        }
        return x;
    }
} P2 static void answer() {
        final Scanner sc = new Scanner(System.in);
        final int a = sc.nextInt();
        final int b = sc.nextInt();
        final int res = calc(a, b);
        System.out.println(res);
    } answer {
        final Scanner sc = new Scanner(System.in);
        final int a = sc.nextInt();
        final int b = sc.nextInt();
        final int res = calc(a, b);
        System.out.println(res);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc final int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc final int res = calc(a, b); res calc(a, b) calc a b System.out.println(res) System.out.println System.out System System.out res static int calc(final int a, final int b) {
        final int per = a - 1;
        final int remain = b - 1;
        final int x = remain / per;
        if (remain - (per * x) > 0) {
            return x + 1;
        }
        return x;
    } calc {
        final int per = a - 1;
        final int remain = b - 1;
        final int x = remain / per;
        if (remain - (per * x) > 0) {
            return x + 1;
        }
        return x;
    } final int per = a - 1; per a - 1 a 1 final int remain = b - 1; remain b - 1 b 1 final int x = remain / per; x remain / per remain per if (remain - (per * x) > 0) {
            return x + 1;
        } remain - (per * x) > 0 remain - (per * x) remain (per * x) per x 0 {
            return x + 1;
        } return x + 1; x + 1 x 1 return x; x final int a a final int b b class P1 {

    static void p1() {
        final Scanner sc = new Scanner(System.in);
        final String yohou = sc.nextLine();
        final String jissai = sc.nextLine();

        final int res = calc(yohou, jissai);
        System.out.println(res);
    }

    static int calc(final String yohou, final String kekka) {
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            }
        }
        return res;
    }
} P1 static void p1() {
        final Scanner sc = new Scanner(System.in);
        final String yohou = sc.nextLine();
        final String jissai = sc.nextLine();

        final int res = calc(yohou, jissai);
        System.out.println(res);
    } p1 {
        final Scanner sc = new Scanner(System.in);
        final String yohou = sc.nextLine();
        final String jissai = sc.nextLine();

        final int res = calc(yohou, jissai);
        System.out.println(res);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final String yohou = sc.nextLine(); yohou sc.nextLine() sc.nextLine sc final String jissai = sc.nextLine(); jissai sc.nextLine() sc.nextLine sc final int res = calc(yohou, jissai); res calc(yohou, jissai) calc yohou jissai System.out.println(res) System.out.println System.out System System.out res static int calc(final String yohou, final String kekka) {
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            }
        }
        return res;
    } calc {
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            }
        }
        return res;
    } int res = 0; res 0 for (int i = 0; i < 3; i++) {
            if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            }
        } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
            if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            }
        } {
            if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            }
        } if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            } Objects.equals(yohou.charAt(i), kekka.charAt(i)) Objects.equals Objects yohou.charAt(i) yohou.charAt yohou i kekka.charAt(i) kekka.charAt kekka i {
                res++;
            } res++ res return res; res final String yohou yohou final String kekka kekka public class Main {
    public static void main(final String[] args) {
        final int p = 3;
        switch (p) {
        case 1:
            P1.p1();
            break;
        case 2:
            P2.answer();
            break;
        case 3:
            P3.answer();
            break;
        }
    }
} public class Main {
    public static void main(final String[] args) {
        final int p = 3;
        switch (p) {
        case 1:
            P1.p1();
            break;
        case 2:
            P2.answer();
            break;
        case 3:
            P3.answer();
            break;
        }
    }
} Main
import java.util.Objects;
import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
        final int p = 3;
        switch (p) {
        case 1:
            P1.p1();
            break;
        case 2:
            P2.answer();
            break;
        case 3:
            P3.answer();
            break;
        }
    }
}

class P3 {
    static void answer() {
        final Scanner sc = new Scanner(System.in);
        final int n = sc.nextInt();
        final int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = sc.nextInt();
        }
        final int res = calc(array);
        System.out.println(res);
    }

    static int calc(final int[] array) {
        int max = 0;
        for (int i = 0; i < array.length; i++) {
            if (max > array.length - i) {
                break;
            }
            final int res = measure(array, i);
            max = Math.max(res, max);
        }
        return max;
    }

    private static int measure(final int[] array, final int pos) {
        int times = 0;
        for (int i = pos; i < array.length - 1; i++) {
            if (array[i] >= array[i + 1]) {
                times++;
            } else {
                break;
            }
        }
        return times;
    }

}

class P2 {
    static void answer() {
        final Scanner sc = new Scanner(System.in);
        final int a = sc.nextInt();
        final int b = sc.nextInt();
        final int res = calc(a, b);
        System.out.println(res);
    }

    static int calc(final int a, final int b) {
        final int per = a - 1;
        final int remain = b - 1;
        final int x = remain / per;
        if (remain - (per * x) > 0) {
            return x + 1;
        }
        return x;
    }
}

class P1 {

    static void p1() {
        final Scanner sc = new Scanner(System.in);
        final String yohou = sc.nextLine();
        final String jissai = sc.nextLine();

        final int res = calc(yohou, jissai);
        System.out.println(res);
    }

    static int calc(final String yohou, final String kekka) {
        int res = 0;
        for (int i = 0; i < 3; i++) {
            if (Objects.equals(yohou.charAt(i), kekka.charAt(i))) {
                res++;
            }
        }
        return res;
    }
}