#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int b[n];
  for (int i = 0; i < n; i++) cin >> b[i];
  int map[n];
  int a[n];
  int j = 0;
  a[j++] = b[0];
  map[0] = 1;
  for (int i = 1; i < n; i++) {
    if (b[i] != b[i - 1]) {
      map[j] = i + 1;
      a[j++] = b[i];
    }
  }
  n = j;
  int index1 = -1, index2 = -1, index3 = -1;
  for (int i = 1; i < n - 1; i++) {
    if ((a[i - 1] < a[i] && a[i + 1] < a[i]) ||
        (a[i - 1] > a[i] && a[i + 1] > a[i])) {
      index1 = map[i - 1];
      index2 = map[i];
      index3 = map[i + 1];
      break;
    }
  }
  if (index1 == -1) {
    cout << 0 << endl;
  } else {
    cout << 3 << endl;
    cout << index1 << " " << index2 << " " << index3 << endl;
  }
  return 0;
}
