#include "bits/stdc++.h"
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define INF 100000000
typedef long long ll;

using namespace std;


int main()
{
    int n;
    int a[100];
    cin >> n;
    int imax = 0;
    int number = 0;
    REP(i, n) {
        cin >> a[i];
        if (imax < abs(a[i])) {
            number = i;
            imax = abs(a[i]);
        }
    }
    cout << 2*n-1 << endl;
    REP(i, n) {
        cout << number + 1 << " " << i + 1 << endl;
        a[i] += a[number];
    }
    if (a[number] >= 0) {
        REP(i, n - 1) {
            cout << i + 1 << " " << i + 2 << endl;
            a[i + 1] += a[i];
        }
    }
    else {
        for(int i=n-2;i>=0;i--) {
            cout << i + 2 << " " << i + 1 << endl;
            a[i] += a[i+1];
        }
    }
    return 0;
}