#include <stdio.h>
int main ()
{
int n , i ,a[1000] ,b[1000] , j ,p ,sum ;
while (scanf ("%d",&n) ==1 && n!=0)
{
i=0 ;
sum=0 ;
while (n>0)
{
a[i] = n%2 ;
n= n/2 ;
i++ ;
}
for (j=i-1 ,p=0 ; j>=0 ; j--)
{
b[p] = a[j] ;
if (b[p] == 1) sum = sum+b[p] ;
p++ ;
}
printf ("The parity of ") ;
for (i=0 ; i<p ; i++) printf ("%d",b[i]) ;
printf (" is %d (mod 2).\n",sum) ;
}
return 0 ;
}
int main ()
{
int n , i ,a[1000] ,b[1000] , j ,p ,sum ;
while (scanf ("%d",&n) ==1 && n!=0)
{
i=0 ;
sum=0 ;
while (n>0)
{
a[i] = n%2 ;
n= n/2 ;
i++ ;
}
for (j=i-1 ,p=0 ; j>=0 ; j--)
{
b[p] = a[j] ;
if (b[p] == 1) sum = sum+b[p] ;
p++ ;
}
printf ("The parity of ") ;
for (i=0 ; i<p ; i++) printf ("%d",b[i]) ;
printf (" is %d (mod 2).\n",sum) ;
}
return 0 ;
}