#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 * 100 + 100;
int n, a[maxn], x[maxn], y[maxn];
int main() {
  cin >> n;
  x[1] = 1;
  y[n] = n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 2; i <= n; i++) {
    if (a[i] == a[i - 1])
      x[i] = x[i - 1];
    else
      x[i] = i - 1;
  }
  for (int i = n - 1; i >= 1; i--) {
    if (a[i] == a[i + 1])
      y[i] = y[i + 1];
    else
      y[i] = i + 1;
  }
  for (int i = 2; i < n; i++) {
    if ((a[x[i]] < a[i] && a[i] > a[y[i]]) ||
        (a[x[i]] > a[i] && a[i] < a[y[i]])) {
      cout << 3 << endl << x[i] << " " << i << ' ' << y[i] << endl;
      return 0;
    }
  }
  cout << 0 << endl;
  return 0;
}
