AddForce not working in: "rigidbody.AddForce(Input);"

I keep getting this error when I run the non-working code. Could anyone help me with this?

Assets/NewBehaviourScript.cs(17,27): error CS1061: Type UnityEngine.Component' does not contain a definition for AddForce’ and no extension method AddForce' of type UnityEngine.Component’ could be found (are you missing a using directive or an assembly reference?)


//Non-working code.
using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
public float moveSpeed;

private Vector3 input;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
	input = new Vector3(Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical"));
	rigidbody.AddForce(Input);
	print (input);
}

}


//Working code.
UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
public float moveSpeed;

private Vector3 input;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
	input = new Vector3(Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical"));
	print (input);
}

}

If you are using Unity 5, consider that the APIs have changed. If you are taking code from old tutorials, things could no longer work as reported.

You should do

GetComponent<Rigidbody>().AddForce(input);

Also note input with the lower-cased i.