#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> seq;
  bool opt[N][2][2];
  for (int i = 0; i < N; i++)
    opt[i][0][0] = opt[i][1][0] = opt[i][0][1] = opt[i][1][1] = 0;
  int curmin = 2e7;
  int curmax = -2e7;
  for (int i = 0; i < N; i++) {
    int cur;
    cin >> cur;
    seq.push_back(cur);
    if (cur >= curmax) opt[i][0][0] = true;
    if (cur <= curmin) opt[i][1][0] = true;
    curmin = min(cur, curmin);
    curmax = max(cur, curmax);
  }
  curmin = 2e7;
  curmax = -2e7;
  for (int i = N - 1; i >= 0; i--) {
    if (seq[i] >= curmax) opt[i][0][1] = true;
    if (seq[i] <= curmin) opt[i][1][1] = true;
    curmin = min(seq[i], curmin);
    curmax = max(seq[i], curmax);
  }
  int ans = -1;
  bool ori = false;
  for (int i = 1; i < N - 1; i++) {
    if ((!opt[i][0][0] && !opt[i][0][1]) || (!opt[i][1][0] && !opt[i][1][1])) {
      if (!opt[i][0][0] && !opt[i][0][1]) ori = true;
      ans = i;
      break;
    }
  }
  if (ans == -1)
    cout << 0;
  else
    cout << 3 << endl;
  if (ori && ans != -1) {
    for (int i = 0; i < ans; i++) {
      if (seq[i] > seq[ans]) {
        cout << i + 1 << " ";
        break;
      }
    }
    cout << ans + 1 << " ";
    for (int i = ans + 1; i < N; i++) {
      if (seq[i] > seq[ans]) {
        cout << i + 1;
        return 0;
      }
    }
  } else if (ans != -1) {
    for (int i = 0; i < ans; i++) {
      if (seq[i] < seq[ans]) {
        cout << i + 1 << " ";
        break;
      }
    }
    cout << ans + 1 << " ";
    for (int i = ans + 1; i < N; i++) {
      if (seq[i] < seq[ans]) {
        cout << i + 1;
        return 0;
      }
    }
  }
}
