#K83862. Calculate Tax Credits

    ID: 36292 Type: Default 1000ms 256MiB

Calculate Tax Credits

Calculate Tax Credits

You are given a string s consisting only of characters A, B, and C. Each character represents a performance score in a sector, with the following point values:

  • \(A: 5\) points
  • \(B: 3\) points
  • \(C: 1\) point

The total points for the string is calculated by summing the points of each character. The tax credits are then computed using the following formula:

[ \text{tax_credits} = \left\lfloor \frac{\text{points}}{10} \right\rfloor \times 2 + \left\lfloor \frac{(\text{points} \bmod 10) \times 2}{10} \right\rfloor ]

Your task is to compute and output the total tax credits for the input string.

inputFormat

The input consists of a single line from stdin containing a non-empty string composed solely of characters 'A', 'B', and 'C'.

outputFormat

Output to stdout a single integer representing the total tax credits computed as described.

## sample
ABAACB
4