hello shouldn't the code below return 11 for "hello there", it returns me the size of the first word i.e 5 for hello

Code:
#include<iostream>
#include <string>
using namespace std;

int main(){
	string a;
	cin>>a;
	cout<<a.size();
}
well if i take the input in the code itself as string a = "hello there". i get 11.

i suspect its some thing related to input stream buffer or something. I am naive at this.