import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author cteam069
 */
public class Owl {

    public static void main(String[] args) throws IOException {
        
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        String line ;
        while((line = r.readLine()) != null){
            if(line.equals("END")){
                return;
            }
            int n = Integer.parseInt(line);
            System.out.println(doIt(n));
        }
        
        
        /*
        System.out.println(""+digiSum(20));*/
    }
    private static int doIt(int n){
        String num= String.valueOf(n);
        int pow = 0;
        for(int i=num.length()-1; i>=0; i--){
            if(num.charAt(i) != '0'){
                return n - (int)Math.pow(10, pow);
            }
            pow++;
        }
        throw new RuntimeException();
    }
    
/*
    private static int digiSum(int n) {
        String nS = "" + n;
        if (nS.length() == 1) {
            return n;
        }
        int cnt = 0;
        else {
            for(char c: nS.toCharArray()){
                cnt += Integer.valueOf(""+c);
                }
                return digiSum(cnt);
        }

    }*/

}