#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n >= 3) {
    int v[3], num[3], l = 0, t;
    for (int i = 0; i < n; i++) {
      cin >> t;
      switch (l) {
        case 0:
          v[0] = t;
          num[0] = i;
          l++;
          break;
        case 1:
        case 2:
          if (v[l - 1] != t) {
            v[l] = t;
            num[l] = i;
            l++;
          }
          break;
        default:
          if (((v[0] < v[1]) && (v[1] > v[2])) ||
              ((v[0] > v[1]) && (v[1] < v[2]))) {
            cout << "3" << endl;
            cout << num[0] + 1 << " " << num[1] + 1 << " " << num[2] + 1
                 << endl;
            return 0;
          }
          if (v[2] != t) {
            v[0] = v[1];
            num[0] = num[1];
            v[1] = v[2];
            num[1] = num[2];
            v[2] = t;
            num[2] = i;
          }
      }
    }
    if (l == 3 && (((v[0] < v[1]) && (v[1] > v[2])) ||
                   ((v[0] > v[1]) && (v[1] < v[2])))) {
      cout << "3" << endl;
      cout << num[0] + 1 << " " << num[1] + 1 << " " << num[2] + 1 << endl;
      return 0;
    }
  }
  cout << "0" << endl;
  return 0;
}
