#include <stdio.h>

int main() {
    int n=0;
    while((scanf("%d",&n))!=EOF)
    {
        if(n==0)
            break;
        //1 2 3 4 5 6 7 8 
        //0 1 1 2 2 3 3 4 
        else 
            printf("%d\n",n/2);
    }
    
    return 0;
}