CF121E Lucky Array

Description

Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Petya has an array consisting of $ n $ numbers. He wants to perform $ m $ operations of two types: - add $ l $ $ r $ $ d $ — add an integer $ d $ to all elements whose indexes belong to the interval from $ l $ to $ r $ , inclusive $ (1

Input Format

The first line contains two integers $ n $ and $ m $ ( $ 1

Output Format

For each operation of the second type print the single number on the single line — the number of lucky numbers in the corresponding interval.

Explanation/Hint

In the first sample after the first addition the array will look in the following manner: 4 5 6 After the second addition: 4 8 9 The second sample after the first addition: 7 7 7 7 After the second addition: 7 47 47 7