public class Solution {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws DownloadException {
        while (true) {
            try (FileInputStream fis = new FileInputStream(readFileName())) {
                if (fis.available() < 1000) {
                    br.close();
                    throw new DownloadException();
                }
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static String readFileName() {
        String fileName = "";
        try {
            fileName = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return fileName;
    }

    public static class DownloadException extends Exception {
    }
}