#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
int arr[maxn];
int ans[maxn];
int k = 0;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
  }
  int flag = 1;
  for (int i = 2; i <= n; i++) {
    if (arr[i] > arr[i - 1]) {
      flag = 0;
      break;
    }
  }
  if (flag) {
    printf("0\n");
    return 0;
  }
  flag = 1;
  for (int i = 2; i <= n; i++) {
    if (arr[i] < arr[i - 1]) {
      flag = 0;
      break;
    }
  }
  if (flag) {
    printf("0\n");
    return 0;
  }
  int mark = 0;
  ans[k++] = 1;
  int i = 2;
  while (i <= n && arr[i] == arr[i - 1]) {
    i++;
  }
  if (arr[i] > arr[i - 1]) {
    mark = 1;
  }
  for (; i <= n; i++) {
    if (arr[i - 1] < arr[i]) {
      if (mark == 0) {
        ans[k++] = i - 1;
        mark = 1;
      }
    }
    if (arr[i - 1] > arr[i]) {
      if (mark == 1) {
        ans[k++] = i - 1;
        mark = 0;
      }
    }
  }
  if (ans[k - 1] != n) {
    ans[k++] = n;
  }
  int minn = 0x3f3f3f3f;
  int x, y, z;
  for (int i = 2; i < k; i++) {
    if (minn > ans[i] - ans[i - 2] + 1) {
      minn = ans[i] - ans[i - 2] + 1;
      x = ans[i - 2], y = ans[i - 1], z = ans[i];
    }
  }
  printf("3\n");
  printf("%d %d %d\n", x, y, z);
  return 0;
}
