1. 


/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10
* Problem: 10696 f91
*
* @author Robert Reichart
*
* Status : Accepted
* Runtime: 2.180
*/

import java.io.*;
import java.util.*;

class Main{
static HashMap<Integer,Integer> results = new HashMap<Integer,Integer>();

public static void main(String... args)throws Exception{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
String line="";
int wert=0;

while (is.ready()){
line=is.readLine();
wert = Integer.parseInt(line);
if (wert!=0){
System.out.println("f91(" + wert + ") = " + f91(wert));
}
}

}

static int f91(int n){
if (results.containsKey(n)){
return results.get(n);
}else{
int tmp;
if (n<=100){
tmp=f91(f91(n+11));
}else{
tmp=n-10;
}
results.put(n, tmp);
return tmp;
}
}
}