#include <bits/stdc++.h>
using namespace std;
int n, a[100100];
bool c;
int main() {
  cin >> n;
  if (n == 1 || n == 2) {
    cout << 0;
    return 0;
  }
  for (int i = 1; i <= n; i++) cin >> a[i];
  vector<int> cch;
  vector<int> chh;
  vector<int> aas;
  aas.push_back(a[1]);
  aas.push_back(a[2]);
  aas.push_back(a[3]);
  cch = aas;
  sort(cch.begin(), cch.end());
  chh = cch;
  reverse(chh.begin(), chh.end());
  if ((aas != cch) && (aas != chh)) {
    cout << 3 << endl;
    cout << 1 << ' ' << 2 << ' ' << 3;
    return 0;
  }
  if (a[1] < a[2] || a[2] < a[3]) c = true;
  if (a[1] == a[2] && a[2] == a[3]) {
    int q = 4;
    while (a[q] == a[3]) q++;
    if (q == n) {
      cout << 0;
      return 0;
    }
    if (a[3] < a[q]) c = true;
  }
  for (int i = 4; i <= n; i++) {
    if (((a[i] < a[i - 1]) && c) || ((a[i] > a[i - 1]) && (!c))) {
      cout << 3 << endl << 1 << ' ' << i - 1 << ' ' << i;
      return 0;
    }
  }
  cout << 0;
}
