#include <bits/stdc++.h>
using namespace std;
const int N = 100002;
int a[N];
int emin[N], emax[N];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  emin[n - 1] = emax[n - 1] = n - 1;
  for (int i = n - 2; i >= 0; --i) {
    if (a[i] < a[emin[i + 1]])
      emin[i] = i;
    else
      emin[i] = emin[i + 1];
    if (a[i] > a[emax[i + 1]])
      emax[i] = i;
    else
      emax[i] = emax[i + 1];
  }
  int lmin = 0, lmax = 0;
  for (int i = 1; i < n - 1; ++i) {
    if (a[i] > a[lmin] && a[i] > a[emin[i + 1]]) {
      cout << 3 << endl;
      cout << lmin + 1 << " " << i + 1 << " " << emin[i + 1] + 1;
      return 0;
    }
    if (a[i] < a[lmax] && a[i] < a[emax[i + 1]]) {
      cout << 3 << endl;
      cout << lmax + 1 << " " << i + 1 << " " << emax[i + 1] + 1;
      return 0;
    }
    if (a[lmax] < a[i]) lmax = i;
    if (a[lmin] > a[i]) lmin = i;
  }
  cout << 0;
  return 0;
}
