/*
 * 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.
 */
package wintadd;

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

/**
 *
 * @author olesnanik2
 */
public class Owl {
    public static void main(String [] arguments) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        String line;
        while((line = reader.readLine()) != null) {
            if (line.equals("END")) {
                break;
            }
            int n = Integer.parseInt(line);
            int base = 1;
            while(base <= n) {
                int c = (n % (base * 10)) / base;
                if (c > 0) {
                    n -= base;
                    break;
                }
                base *= 10;
            }
            System.out.println(n);
        }        
    }
}