#include <bits/stdc++.h>
using namespace std;
int arr[100006];
int N;
bool isInc() {
  for (int i = 1; i < N; ++i) {
    if (arr[i] < arr[i - 1]) return 0;
  }
  return 1;
}
bool isDec() {
  for (int i = 1; i < N; ++i) {
    if (arr[i] > arr[i - 1]) return 0;
  }
  return 1;
}
pair<int, int> nums[100001];
int cnt[100001];
int comp[100001];
void compress() {
  int idx = 0, c;
  arr[N++] = (1 << 28);
  for (int i = 1; i < N; ++i) {
    c = 0;
    while (arr[i] == arr[i - 1] && i < N) {
      c++;
      i++;
    }
    nums[idx++] = make_pair(i - 1, arr[i - 1]);
  }
  N = idx;
}
vector<vector<pair<int, int> > > res;
vector<int> Gl;
void show(pair<int, int> r, int i, int j) {
  int idx = res[r.first][i].second;
  int sz = res[r.first][i].first + 1;
  for (int i = 0; i < 1; ++i) {
    Gl.push_back((idx + i) + 1);
  }
  idx = res[r.first][j].second;
  sz = res[r.first][j].first + 1;
  for (int i = 0; i < 1; ++i) {
    Gl.push_back((idx + i) + 1);
  }
}
void BF() {
  for (int i = 1; i < N - 1; ++i) {
    if (nums[i].second > nums[i - 1].second &&
        nums[i].second > nums[i + 1].second) {
      Gl.push_back((nums[i - 1].first) + 1);
      Gl.push_back((nums[i].first) + 1);
      Gl.push_back((nums[i + 1].first) + 1);
      break;
    }
    if (nums[i].second < nums[i - 1].second &&
        nums[i].second < nums[i + 1].second) {
      Gl.push_back((nums[i - 1].first) + 1);
      Gl.push_back((nums[i].first) + 1);
      Gl.push_back((nums[i + 1].first) + 1);
      break;
    }
  }
}
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; ++i) scanf("%d", &arr[i]);
  memset(cnt, 0, sizeof(cnt));
  if (isInc() || isDec()) {
    cout << "0" << endl;
    return 0;
  }
  compress();
  BF();
  cout << Gl.size() << endl;
  for (int i = 0; i < Gl.size(); ++i) {
    if (i) cout << " ";
    cout << Gl[i];
  }
  cout << endl;
}
