#include <bits/stdc++.h>
static bool sign(FILE *fp, const int64_t n,
                 std::function<bool(const int64_t i, const int64_t s)> cb) {
  int64_t a = 0;
  for (int64_t i = 0; i < n; i++) {
    int64_t b = 0;
    if (fscanf(stdin, "%" SCNd64, &b) != 1) {
      fprintf(stderr, "fscanf: Value IO error.\n");
      exit(EXIT_FAILURE);
    }
    if (i > 0 && !cb(i, a < b ? 1 : a > b ? -1 : 0)) return false;
    a = b;
  }
  return true;
}
int main(int argc, char *argv[]) {
  int64_t n;
  if (fscanf(stdin, "%" SCNd64, &n) != 1) {
    fprintf(stderr, "fscanf: Header IO error.\n");
    exit(EXIT_FAILURE);
  }
  if (n < 3) {
    puts("0");
    return EXIT_SUCCESS;
  }
  int64_t j = 0, t = 0;
  if (sign(stdin, n, [&j, &t](const int64_t i, const int64_t s) {
        if (s != 0) {
          if (t == 0) {
            t = s;
            j = i;
          } else if (s != t) {
            printf("3\n%" PRId64 " %" PRId64 " %" PRId64 "\n", j - 1 + 1,
                   i - 1 + 1, i + 1);
            return false;
          }
        }
        return true;
      }))
    puts("0");
  return EXIT_SUCCESS;
}
