import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] m = new int[n]; for(int m_i=0; m_i < n; m_i++){ m[m_i] = in.nextInt(); } int prev = m[0]; boolean flag = true; for(int m_i=1; m_i < n; m_i++){ flag = flag&&(prev < m[m_i]); prev = m[m_i]; } if(flag) throw new RuntimeException(); System.out.println(0); // your code goes here } }