#include <bits/stdc++.h>
using namespace std;
const long double epsilon = 1e-9;
int minl[1 << 17];
int minr[1 << 17];
int maxl[1 << 17];
int maxr[1 << 17];
int minlidx[1 << 17];
int minridx[1 << 17];
int maxlidx[1 << 17];
int maxridx[1 << 17];
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  vector<int> b(v);
  sort(b.begin(), b.end());
  if (b == v) {
    cout << 0 << endl;
    return 0;
  }
  reverse(b.begin(), b.end());
  if (b == v) {
    cout << 0 << endl;
    return 0;
  }
  int minm = v[0];
  int maxm = v[0];
  int minidx = 0;
  int maxidx = 0;
  cout << 3 << endl;
  for (int i = 0; i < n; i++) {
    minl[i] = v[i];
    minlidx[i] = i;
    maxl[i] = v[i];
    maxlidx[i] = i;
    if (i > 0) {
      if (minl[i - 1] < v[i]) {
        minl[i] = minl[i - 1];
        minlidx[i] = minlidx[i - 1];
      }
      if (maxl[i - 1] > v[i]) {
        maxl[i] = maxl[i - 1];
        maxlidx[i] = maxlidx[i - 1];
      }
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    minr[i] = v[i];
    minridx[i] = i;
    maxr[i] = v[i];
    maxridx[i] = i;
    if (i < n - 1) {
      if (minr[i + 1] < v[i]) {
        minr[i] = minr[i + 1];
        minridx[i] = minridx[i + 1];
      }
      if (maxr[i + 1] > v[i]) {
        maxr[i] = maxr[i + 1];
        maxridx[i] = maxridx[i + 1];
      }
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (v[i] > minl[i - 1] && v[i] > minr[i + 1]) {
      cout << minlidx[i - 1] + 1 << " " << i + 1 << " " << minridx[i + 1] + 1
           << endl;
      return 0;
    }
    if (v[i] < maxl[i - 1] && v[i] < maxr[i + 1]) {
      cout << maxlidx[i - 1] + 1 << " " << i + 1 << " " << maxridx[i + 1] + 1
           << endl;
      return 0;
    }
  }
  return 0;
}
