#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll MOD = 1e+9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed;
  cout << setprecision(10);
  int n, k;
  cin >> n >> k;
  int arr[n + 1];
  for (int i = 1; i <= n; i++) cin >> arr[i];
  vector<string> ans(n + 100, "");
  for (int i = 1; i <= 1000; i++) {
    vector<string> cur;
    for (int j = 1; j <= n; j++) {
      int val = i + (j - 1) * k;
      string s = "";
      if (val < arr[j]) {
        s = "- ";
        s += to_string(j);
        s += ' ';
        s += to_string(arr[j] - val);
        cur.push_back(s);
      } else if (val > arr[j]) {
        s = "+ ";
        s += to_string(j);
        s += ' ';
        s += to_string(val - arr[j]);
        cur.push_back(s);
      }
    }
    if (cur.size() < ans.size()) ans = cur;
  }
  cout << ans.size() << '\n';
  for (string i : ans) cout << i << '\n';
}
