#include<iostream>
using namespace std;
int main(){
int n;
//cin>>n;
while(cin>>n , n!=0){
cout<<n/2<<endl;
}
return 0;
}
#include<iostream>
using namespace std;
int main(){
int n;
//cin>>n;
while(cin>>n , n!=0){
cout<<n/2<<endl;
}
return 0;
}