#include <bits/stdc++.h>
using namespace std;
const int N = 100004;
pair<int, int> minLeft[N], minRight[N], maxLeft[N], maxRight[N];
int arr[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  minLeft[0] = minRight[n + 1] = {1e9, N};
  maxLeft[0] = maxRight[n + 1] = {-1e9, N};
  for (int i = 1; i <= n; i++) {
    pair<int, int> curr(arr[i], i);
    minLeft[i] = min(minLeft[i - 1], curr);
    maxLeft[i] = max(maxLeft[i - 1], curr);
  }
  for (int i = n; i > 0; i--) {
    pair<int, int> curr(arr[i], i);
    minRight[i] = min(minRight[i + 1], curr);
    maxRight[i] = max(maxRight[i + 1], curr);
  }
  for (int i = 2; i < n; i++) {
    if (minLeft[i - 1].first < arr[i] && minRight[i + 1].first < arr[i])
      return printf("3\n%d %d %d", minLeft[i - 1].second, i,
                    minRight[i + 1].second),
             0;
    if (maxLeft[i - 1].first > arr[i] && maxRight[i + 1].first > arr[i])
      return printf("3\n%d %d %d", maxLeft[i - 1].second, i,
                    maxRight[i + 1].second),
             0;
  }
  printf("0");
  return 0;
}
