#include<stdlib.h>
#include<ctype.h>
#include<string.h>

void pop(char *s, char *p) {
  int l = strlen(s) - 1;
  for (int i = p - s;  i < l; i++) s[i] = s[i+1];
  s[l] = '\0';
}

int strclean(char *t) {
  if (!t) return -1;
  int count = 0, ind = 0;
  while (t[ind] != '\0') {
    if (!isgraph(t[ind])) {
      pop(t, t + ind); count++;
    } else ind++;
  }
  return count;
}


