#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, numChanges;
  cin >> n >> k;
  int finalChanges = n;
  vector<int> a(n);
  vector<int> ans(n);
  vector<int> finalAns(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    numChanges = 0;
    ans[i] = a[i];
    for (int j = i; j > 0; j--) {
      ans[j - 1] = ans[j] - k;
      if (ans[j - 1] < 1) {
        numChanges = n;
      }
      if (ans[j] - a[j - 1] != k) {
        numChanges++;
      }
    }
    for (int j = i; j < n - 1; j++) {
      ans[j + 1] = ans[j] + k;
      if (a[j + 1] - ans[j] != k) {
        numChanges++;
      }
    }
    if (numChanges < finalChanges) {
      finalAns = ans;
      finalChanges = numChanges;
    }
  }
  cout << finalChanges << endl;
  for (int i = 0; i < n; i++) {
    if (finalAns[i] != a[i]) {
      cout << (finalAns[i] > a[i] ? "+ " : "- ") << i + 1 << " "
           << abs(finalAns[i] - a[i]) << endl;
    }
  }
  return 0;
}
