Time Limit:1000ms Memory Limit:65536KB |

## Description |

Given a non-negative number, if we delete some digitals of the number and obtain 1957, we call it 1957 Number. You are expected to calculate the number of 1957 Number no more than X, where X is given. |

## InputMutuple test cases. A non-negative number X (0<=X<10^9) in each line. |

## OutputFor each test case, output the answer in a single line. |

## Sample Input1957 |

## Sample Output1 |

## HintHuge input, C-style IO functioin(scanf & printf) recommended. |

## Authorbaihacker |

## Source |