code: public static int checksum(CharSequence input) {
          if (input == null || !atLeastFiveNonSpaceCharacters(input)) {
              throw new IllegalArgumentException("The input must be non-null and contain at least five non-space characters.");
          }
          final char[] buffer = new char[input.length() * 2];
          int offset = transform(input, 4, input.length(), buffer, 0);
          offset = transform(input, 0, 4, buffer, offset);
          final BigInteger sum = new BigInteger(new String(buffer, 0, offset));
          final BigInteger remainder = sum.remainder(NINETY_SEVEN);
          return remainder.intValue();
      }
docs: Calculates the raw MOD97 checksum for a given input.
  <p>
  The input is allowed to contain space characters. Any character outside the range {@code [A-Za-z0-9 ]} will cause
  an IllegalArgumentException to be thrown. This method allocates a temporary buffer of twice the input length, so
  it will fail for unreasonably large inputs.</p>
  <p>
  It is expected, but not enforced, that the characters at index 2 and 3 are numeric. If the existing check digits
  are {@code 00} then this method will return the value that, after subtracting it from 98, gives you the check
  digits for a MOD-97 verifiable string. If the existing check digits are any other value, this method will return
  {@code 1} if the input checksums correctly.</p>
  <p>
  You may want to use {@link #calculateCheckDigits(CharSequence)} or {@link #verifyCheckDigits(CharSequence)}
  instead of this method.</p>
  
  @param input the input, which should be at least five characters excluding spaces.
  @return the check digits calculated for the given IBAN.
  @throws IllegalArgumentException if the input is in some way invalid.
  @see #calculateCheckDigits(CharSequence)
  @see #verifyCheckDigits(CharSequence)