#include <stdio.h>
int main ()
{
int n ,x;
int f91 (int n) ;
while (scanf ("%d",&n) == 1 && n!=0)
{
int f91 (int n)
{
if (n<=100) return ( f91( f91(11 + n) ) ) ;
else if (n >= 101) return (n-10) ;
}
printf ("f91(%d) = %d\n",n , f91 (n) ) ;
}
return 0 ;
}
int main ()
{
int n ,x;
int f91 (int n) ;
while (scanf ("%d",&n) == 1 && n!=0)
{
int f91 (int n)
{
if (n<=100) return ( f91( f91(11 + n) ) ) ;
else if (n >= 101) return (n-10) ;
}
printf ("f91(%d) = %d\n",n , f91 (n) ) ;
}
return 0 ;
}