#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int N, k;
  cin >> N >> k;
  int A[N];
  for (int i = 0; i < N; ++i) cin >> A[i];
  int ans = N - 1;
  int M = A[0];
  for (int a = 1; a <= 1000; ++a) {
    int mins = 0;
    if (a != A[0]) ++mins;
    for (int i = 1; i < N; ++i)
      if (A[i] != a + (k * i)) ++mins;
    if (ans > mins) ans = mins, M = a;
  }
  cout << ans;
  for (int i = 0; i < N; ++i) {
    if (A[i] == M + k * i) continue;
    cout << '\n';
    if (A[i] > M + k * i)
      cout << '-';
    else
      cout << '+';
    cout << ' ' << i + 1 << ' ' << abs(A[i] - (M + k * i));
  }
  return 0;
}
