Input.acceleration with Screen.width

I want my player object to go right if player hold his finger at the right half of the screen and same with left. What should i write in to script? Is something like this would work?

If(Input.acceleration.x > (Screen.widht / 2))
moveHorizontal = new Vector3(0.0f, 0.0f, 1.0f)
If(Input.acceleration.x < (Screen.widht / 2))
moveHorizontal = new Vector3(0.0f, 0.0f, -1.0f)

if(Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.began)
{
Touch touch = Input.GetTouch(0);
if (touch.position.x <= Screen.width / 2f) // if left side of screen is touched
{
GetComponent().AddForce(Vector3.left * moveSpeed);
// you should declare moveSpeed as a float. Like: public float moveSpeed = 3.0f;
}
else if (touch.position.x > Screen.width / 2f) // if right side touched
{
GetComponent().AddForce(Vector3.right * moveSpeed);
}
}