// textin1.cpp -- reading chars with a while loop
#include <iostream>
using namespace std;
int main()
{
    char ch;
    int count = 0;      // use basic input

    cin >> ch;          // get a character
    while (ch != '#')   // test the character
    {
        cout << ch;     // echo the character
        count++;        // count the character
        cin >> ch;      // get the next character
    }
    cout << "\n" << count << " characters read\n";
    return 0;
}

