#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, a[1010];
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int ans = 1001, flag;
  for (int i = 1; i <= 1000; i++) {
    int tmp = 0;
    for (int j = 1; j <= n; j++) {
      if (((j - 1) * k + i) != a[j]) tmp++;
    }
    if (tmp < ans) {
      ans = tmp;
      flag = i;
    }
  }
  cout << ans << endl;
  for (int i = 1; i <= n; i++) {
    int shod = flag + (i - 1) * k;
    if (a[i] < shod) {
      cout << "+ " << i << " " << shod - a[i] << endl;
    }
    if (a[i] > shod) {
      cout << "- " << i << " " << a[i] - shod << endl;
    }
  }
  return 0;
}
