#include <fstream>
#include <string.h>

using namespace std;

int main(){
   string s;
   ifstream fi;
   fi.open("DEMTU.INP");
   std:getline(fi,s);
   fi.close();
   ofstream fo;
   fo.open("DEMTU.OUT");
   long long i=0,num=0;
   for (i=0;i<s.length();i++){
        while (s[i]==' '&&s[i+1]==' '){s.erase(i,1);}
   }
   if (s[0]==' '){s.erase(0,1);}
   for (i=0;i<s.length();i++){if (s[i]==' '){num++;}}
   fo<<num+1;
}

