#include <stdio.h>

int main(void)
{
  int countch=0;
  int countwd=1;

  printf("Enter your sentence in lowercase: ");
  int ch='a';
  
  while(ch!='\n')
  {
    ch=getchar();
    if(ch==' ')
      countwd++;
    else
      countch++;
  }

  printf("Words = %d\n",countwd);
  printf("Characters = %d\n",countch-1);

  return 0;
}