#include <bits/stdc++.h>
using namespace std;
vector<bool> visited;
bool dfs(vector<vector<int> > &pos, int root, int pos2) {
  visited[root] = true;
  for (int i = 0; i < pos[root].size(); i++) {
    if (pos[root][i] == pos2) return true;
  }
  for (int i = 0; i < pos[root].size(); i++) {
    if (!visited[pos[root][i]]) {
      bool x = dfs(pos, pos[root][i], pos2);
      if (x) return true;
    }
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> lmax(n, 0), lmin(n, 0), rmin(n, 0), rmax(n, 0);
  for (int i = 1; i < n; i++) {
    if (a[i] >= a[lmax[i - 1]])
      lmax[i] = i;
    else
      lmax[i] = lmax[i - 1];
    if (a[i] <= a[lmin[i - 1]])
      lmin[i] = i;
    else
      lmin[i] = lmin[i - 1];
  }
  rmax[n - 1] = rmin[n - 1] = n - 1;
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] >= a[rmax[i + 1]])
      rmax[i] = i;
    else
      rmax[i] = rmax[i + 1];
    if (a[i] <= a[rmin[i + 1]])
      rmin[i] = i;
    else
      rmin[i] = rmin[i + 1];
  }
  bool yes = false;
  for (int i = 0; i < n; i++) {
    if (lmax[i] != i) {
      yes = true;
    }
  }
  if (!yes) {
    cout << "0\n";
    return 0;
  }
  yes = false;
  for (int i = 0; i < n; i++) {
    if (rmax[i] != i) {
      yes = true;
    }
  }
  if (!yes) {
    cout << "0\n";
    return 0;
  }
  int index = -1;
  bool max = false;
  for (int i = 1; i < n - 1; i++) {
    if (a[i] < a[lmax[i - 1]] && a[i] < a[rmax[i + 1]]) {
      max = true;
      index = i;
      break;
    }
    if (a[i] > a[lmin[i - 1]] && a[i] > a[rmin[i + 1]]) {
      index = i;
      break;
    }
  }
  cout << "3\n";
  if (max) {
    cout << lmax[index - 1] + 1 << " " << index + 1 << " "
         << rmax[index + 1] + 1 << endl;
  } else {
    cout << lmin[index - 1] + 1 << " " << index + 1 << " "
         << rmin[index + 1] + 1 << endl;
  }
  return 0;
}
