#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define ALL(v) v.begin(), v.end()
 
using namespace std;
using ll = long long;
using ld = long double;
template <class T> using Vec = vector<T>;
constexpr ll INF = 1010000000000000017;


int main() {
ll n;
  cin >> n;
  if(n==1){
  	cout << 0;
  }
  else{
  	cout << n-1;
  }

  
  return 0;
}
#include<bits/stdc++.h>
#define x first
#define y second
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
const int N=110;

int main()
{
string s;
getline(cin,s);
int n=s.size();
for(int i=0;i<n;i++)
{
if(s[i]=='.') break;
cout<<s[i];
}
return 0;
}