private static String rubley(BigDecimal amount) {
        BigInteger r = amount.setScale(0, RoundingMode.DOWN).toBigInteger();
        String result = "рублей";
        r = r.remainder(BigInteger.valueOf(100));
        if (r.compareTo(BigInteger.TEN) > 0 && r.compareTo(BigInteger.valueOf(20)) < 0) {
            result = "рублей";
        } else {
            int last = r.remainder(BigInteger.TEN).intValue();
            switch (last) {
                case 1:
                    result = "рубль";
                    break;
                case 2:
                case 3:
                case 4:
                    result = "рубля";
                    break;
                default:
                    result = "рублей";
            }
        }
        return result;
    }